[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected behavior with TZ
From: |
Chet Ramey |
Subject: |
Re: Unexpected behavior with TZ |
Date: |
Fri, 08 Apr 2011 09:38:29 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
On 4/7/11 6:16 PM, gmail wrote:
> The multibyte test is successful on my host if i have first unset LC_ALL
> and LC_CTYPE before running it.
>
> I 'm not fully familiar with POSIX specifications regarding locales, for
> now these specifications let me think that this behavior is expected and
> that the
> LANG environment variable is taken into account after the LC_* environment
> variables. Therefore, perhaps this could be a way to deal with this issue
> without (i hope) side effects on other archs :
>
> --- tests/printf2.sub.orig 2009-02-24 20:12:32.000000000 +0100
> +++ tests/printf2.sub 2011-04-07 23:21:24.000000000 +0200
> @@ -1,4 +1,6 @@
> export LANG=en_US.UTF-8
> +unset LC_ALL
> +unset LC_CTYPE
>
> case $(printf %d\\n \'Ã) in
> 192) exit 0;;
Thanks for the report. Good catch.
> On another point, the multibyte documentation on mblen and mbtowc mentions
> that these two methods maintains an internal shift state (probably a way to
> be able to operate with bytes streams).
> I have noticed the DECLARE_MBSTATE macro in the asciicode method and wonder
> if it is the way to guaranteed a clear initial state to the mblen and
> mbtowc method.
Yes. Look in include/shmbutil.h for the definition of DECLARE_MBSTATE.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Potential bug in library search for libiconv in static build, gmail, 2011/04/03
- Re: Potential bug in library search for libiconv in static build, Chet Ramey, 2011/04/04
- Re: Potential bug in library search for libiconv in static build, gmail, 2011/04/04
- Re: Potential bug in library search for libiconv in static build, gmail, 2011/04/05
- Re: Potential bug in library search for libiconv in static build, Chet Ramey, 2011/04/05
- Unexpected behavior with TZ, gmail, 2011/04/05
- Re: Unexpected behavior with TZ, Chet Ramey, 2011/04/06
- Re: Unexpected behavior with TZ, gmail, 2011/04/07
- Re: Unexpected behavior with TZ, Marc Herbert, 2011/04/08
- Re: Unexpected behavior with TZ,
Chet Ramey <=