This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coding neutral regexec to do UTF-8 ranges


* Joël Krähemann:

> You just ignored the main issue. Getting gettext to work.
>
> I assume uselocale() does almost the same as putenv() passing
> the environment variable. This is what I actually do.

It's subtly different: uselocale only affects the current thread.

> putenv("LANG=C");
> putenv("LC_ALL=C");
>
> However gettext requires UTF-8 locales, afaik. I need a solution that
> works for every thread that might call ags_turtle.c related functions.

You need to set and restore the thread locale around the regular
expression function calls (for both compilation and execution).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]