Hi everbody,
in my system the LANG environment is set to "de_DE@euro". VDR did not recognize this character set. After I changed LANG to "de_DE.iso-8859-15" umlauts are correctly displayed e.g.in the EPG data. But I still get the following error in syslog: "codeset is 'ISO-8859-15' - unknown". What's wrong here?
I had a look into vdr.c and found out, that the dot is used delimiter between language and codeset - as "de_DE@euro" does not contain any dot, vdr fails to recognize this. Is "de_DE@euro" an invalid value for this variable?
Regards,
Joachim.
Joachim Wilke wrote:
Hi everbody,
in my system the LANG environment is set to "de_DE@euro". VDR did not recognize this character set. After I changed LANG to "de_DE.iso-8859-15" umlauts are correctly displayed e.g.in the EPG data. But I still get the following error in syslog: "codeset is 'ISO-8859-15' - unknown". What's wrong here?
I had a look into vdr.c and found out, that the dot is used delimiter between language and codeset - as "de_DE@euro" does not contain any dot, vdr fails to recognize this. Is "de_DE@euro" an invalid value for this variable?
It is not. "locale -a" prints all the installed locales, and any of those values is valid for you to use.
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.
On 06/10/07 22:22, Anssi Hannula wrote:
Joachim Wilke wrote:
Hi everbody,
in my system the LANG environment is set to "de_DE@euro". VDR did not recognize this character set. After I changed LANG to "de_DE.iso-8859-15" umlauts are correctly displayed e.g.in the EPG data. But I still get the following error in syslog: "codeset is 'ISO-8859-15' - unknown". What's wrong here?
I coded this in libsi/si.c as ISO8859-15 (without the first '-'). I guess we can change this to ISO-8859-15 just as well. Please try it and let me know if that fixes it.
I had a look into vdr.c and found out, that the dot is used delimiter between language and codeset - as "de_DE@euro" does not contain any dot, vdr fails to recognize this. Is "de_DE@euro" an invalid value for this variable?
It is not. "locale -a" prints all the installed locales, and any of those values is valid for you to use.
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? ;-)
Somebody with insight please advise exactly how to do this - I personally just set LANG to de_DE.iso8859-1 and live happily ever after ;-)
Klaus
Klaus Schmidinger wrote:
On 06/10/07 22:22, Anssi Hannula wrote:
Joachim Wilke wrote:
I had a look into vdr.c and found out, that the dot is used delimiter between language and codeset - as "de_DE@euro" does not contain any dot, vdr fails to recognize this. Is "de_DE@euro" an invalid value for this variable?
It is not. "locale -a" prints all the installed locales, and any of those values is valid for you to use.
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? ;-)
Somebody with insight please advise exactly how to do this - I personally just set LANG to de_DE.iso8859-1 and live happily ever after ;-)
Looking at nl_langinfo manpage, it seems to me that nl_langinfo(CODESET) is the correct one to use:
Return a string with the name of the character encoding used in the selected locale, such as "UTF-8", "ISO-8859-1", or "ANSI_X3.4-1968" (better known as US-ASCII). This is the same string that you get with "locale charmap". For a list of charac- ter encoding names, try "locale -m", cf. locale(1).
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 :-)
Kind regards, Stefan
On Mon, Jun 11, 2007, Stefan Taferner wrote:
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 :-)
This contradicts the setlocale(3) man page.
HTH, Johannes