Ian wrote:
> > How deeply needed is the setlocale(LC_CTYPE, ""); in fl_open_display()
> > in Fl_x.cxx?
> >=20
> > I was checking how well Dillo worked with LC_CTYPE=3Dtr_TR
> > ( http://en.wikipedia.org/wiki/Dotted_and_dotless_I ),
> > and the answer was "not all that wonderfully" thanks to the
> > various strcasecmp()s we have strewn about.
> >=20
> > FLTK itself does not have as many strcasecmp()s, but
> > a quick little way to get it to misbehave is to put a
> > "<i>italic</i>" in test/unittest_about.cxx.
> > Under tr_TR, it won't italicize.
>
>
> Hmm, I didn't even know we had that... Well, there you go.
> My gut reaction (based on absolutely no testing whatsoever!) is that we
> shouldn't need that... But maybe we do. Or... Hmm, yes, maybe we should
> do that, though...
>
> I wonder... Was it added to aid IM support, does anybody know? Or as
> part of the UTF8 conversion perhaps?
>
> Blimey - fl_open_display() is *old*; checked in by Mike at r2!
>
> The setlocale stuff was added at r6212, so I'd guess it was tied in with
> the UTF8 work...
>
> Hmm, setting LC_CTYPE to be explicitly "" seems like it *would* be the
> Right Thing To Do, when I think about it - that basically means (as I
> understand it, I may be wrong!) that we are telling the CTYPE settings
> to use the "native" values set in the environment variables, rather than
> just defaulting to the "C" environment, and I guess for a UTF8 capable
> program that would *seem* like a reasonable thing to do?
> We want the conversions and comparisons set for the native language
> rather than the default "C" ones, I guess.
>
> Or...=20
>
> Maybe rather than setting the environment to tr_TR you should try
> setting tr_UTF8 (or whatever the syntax is, I never remember) and see if
> that plays out nicer, given that fltk will now be *trying* to work with
> UTF8 encoded strings rather than tr_TR "codepage" style stuff?
>
> Or am I talking nonsense again?

I mean that, suppose someone runs
$ export LC_CTYPE=tr_TR [or tr_TR.UTF-8]
$ dillo [or unittests]
..and setlocale(LC_CTYPE, "") pulls the tr_TR from the environment
and sets the locale, and then strcasecmp("i", "I") in Turkish is
nonzero, whereas strcasecmp("i", "İ") or strcasecmp("I", "ı") are zero.


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to