[Top][All Lists]

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

Re: Questionable code behavior in u32cconv?

From: Chet Ramey
Subject: Re: Questionable code behavior in u32cconv?
Date: Mon, 20 Feb 2012 22:05:24 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 2/18/12 7:07 AM, John Kearney wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include
> -I../bash/lib   -g -O2 -Wall
> uname output: Linux DETH00 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20
> 17:23:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
> Bash Version: 4.2
> Patch Level: 10
> Release Status: release
> Description:
> Now I may be misreading the code but it looks like the code relating
> to iconv is only checking the destination charset the first time, the
> code is executed.
> as such breaking the following functionality.
> LC_CTYPE=C printf '\uff'
> LC_CTYPE=C.UTF-8 printf '\uff'
> Repeat-By:
>       haven't seen the problem.

I can't reproduce it, even using C, zh_CN, and en_US.UTF-8, but I agree
that the static data should be reset when the locale, or at least
LC_CTYPE, changes.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]