[haiku-commits] Re: haiku: hrev43933 - src/system/libroot/add-ons/icu

  • From: Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 01 Apr 2012 22:16:23 +0200

Hi John,

On 2012-04-01 at 19:58:56 [+0200], John Scipione <jscipione@xxxxxxxxx> 
wrote:
> On Sun, Apr 1, 2012 at 11:44 AM,  <zooey@xxxxxxxxxxxxxxx> wrote:
> > diff --git a/src/system/libroot/add-ons/icu/ICUCategoryData.cpp 
> > b/src/system/libroot/add-ons/icu/ICUCategoryData.cpp
> > index 1a7af42..a2ca4c1 100644
> > --- a/src/system/libroot/add-ons/icu/ICUCategoryData.cpp
> > +++ b/src/system/libroot/add-ons/icu/ICUCategoryData.cpp
> > @@ -125,6 +125,7 @@ ICUCategoryData::_GetConverter(UConverter*& 
> > converterOut)
> >                // charset no longer matches the converter, we need to 
> >                dump it and
> >                // create a new one
> >                ucnv_close(tlsValue->converter);
> > +               tlsValue->converter = NULL;
> >        }
> >
> >        // create a new converter for the current charset
> 
> A while ago I tried to make Deskbar and Tracker use a localized
> compare method from ICU to do locale-aware natural sorting but it
> would crash the app after the first compare, could this change
> possibly fix that bug?

If you were using some of the POSIX locale functions (strxfrm() and/or 
strcoll() come to mind), this could be the case, yes.
If you were using stuff from the Locale Kit, then this fix won't help, as 
it just relates to the internal, ICU-based backend used by libroot to 
implement the POSIX locale.

cheers,
        Oliver

Other related posts: