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

Re: setlocale() and gettext() (Re: CVS dpkg flaws)



At Mon, 31 Dec 2001 15:24:32 +0100,
Wichert Akkerman wrote:
> > setlocale(LC_CTYPE, "C") breaks gettext() encoding conversion features.
> > Wichert, why did you add this?
> 
> ChangeLog says:
> 
> Mon Jul 16 15:20:07 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
> 
>   * main/main.c, main/query,c. dselect/main.cc: use C locale for LC_CTYPE
>     so we can be sure packagename and version comparisons work as expected
> 
> Why would setting LC_CTYPE break output routines?

Because AFAIK gettext() converts message's encoding as locale configurations.
If it fails, it'll output the characters as `?'.
Since Japanese characters couldn't be converted to ASCII chars, all
message will be represented as `?'

See also "Charset convension" in gettext info.

Thanks,
Fumitoshi UKAI



Reply to: