On Sonntag, 10. Juni 2007, Klaus Schmidinger wrote:
> On 06/10/07 22:22, Anssi Hannula wrote:
> > I didn't find any info via quick search, but I believe that instead of
> > parsing the localename, VDR should use some external function to get the
> > language/charset of the current locale.
> There's getenv("LANG"), setlocale(LC_CTYPE, ""), and Thomas Günther
> recently suggested in a PM to use nl_langinfo(CODESET). Quite a few
> options - which one is the right one? ;-)
I would also use nl_langinfo(CODESET), as Anssi said.
getenv("LANG") is probably to coarse and the old way of doing things,
nl_langinfo is the modern way.
setlocale(LC_CTYPE, "") sets the locale to nothing -- what you probably meant
is setlocale(LC_CTYPE, 0) ... just to clarify things, in case somebody wants
to use the knowledge of these emails later :-)
vdr mailing list