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 [email protected] http://cnswww.cns.cwru.edu/~chet/