tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Per thread locales

In article <>,
Martin Husemann  <> wrote:
>New firefox uses a newer version of skia that uses a  helper class
>"GrAutoLocaleSetter" to temporarily switch the locale to "C" while parsing
>GL shaders.
>IIUC Jörg strongly prefers to fix all locale sensitiv calls to use variants
>explicitly passing the locale (which is most simple for "C").
>However, this is not always trivial (when the code uses lots of deeply nested
>library code) so patches are hard to verify and even harder to upstream.
>I would argue that besides very special situations the usage sketched above
>is the only valid reason to temporarily switch locales at runtime, and it may
>make sense to add special case support for it.
>A relatively simple & cheap hack would be a per-thread flag "override process
>locale with C" and a uselocale() function that recognizes "C" and the
>process locale and then sets/clears the flag accordingly, failing in all
>other cases.

We need to decide what to do with our locale situation. Ours (citrus)
needs some tender loving and attention which is not getting. We either
have to allocate enough manpower to bring it up to speed, or jettison
it and copy somebody elses (FreeBSD?).


Home | Main Index | Thread Index | Old Index