Alexander E. Patrakov wrote:

> some tme ago I imported from DIY linux the statement that none of the 
> locales are really required. As it stands now, this statement is wrong. 
> When checking whether the ctype macros accept non-ascii characters, Bash 
> configure script attempts to set the en_US.ISO8859-1 locale. However, it 
> may or may not be present, thus the result may vary.

Correct. However, the problem is with Readline and not Bash. The configure
check you refer to affects the define of CTYPE_NON_ASCII. This in turn
affects chardefs.h:

#if defined (CTYPE_NON_ASCII)
#  define NON_NEGATIVE(c) 1
#  define NON_NEGATIVE(c) ((unsigned char)(c) == (c))

Now grep the Readline source for NON_NEGATIVE and you can see how it makes
a difference.

> Two solutions:
> 1) mark the en_US locale as required, don't change bash instructions
> 2) don't mark any locales as required, add 
> "bash_cv_func_ctype_nonascii=yes" to the end of bash configure line
> My preference is (2). Please don't import this into HLFS, because I 
> think that "no" would be the correct result for uClibc.

I'll probably go for (2) in DIY (but of course in Readline, not Bash)

Some other comments:

 - The configure check in question is skipped when cross compiling

 - The Bash testsuite will gain greater coverage if the locale en_US.UTF-8
   is installed

 - If you're wise you will not rely on anything I (or DIY) say about
   internationalization. Me being a native English speaker I have no
   personal need for it and because I'm a selfish b*stard I'm not likely
   to become an expert anytime soon :-)

 - I'd appreciate it if you could report DIY issues to the DIY list or to
   me personally. Thanks.


PS - Slightly OT but in case you haven't seen it, there is a reasonable
(but possibly inaccurate) writeup of UTF-8 issues here:

PPS - Some folks have asked me about UTF-8. In short, I have no clue. I
admire the distros for forging ahead. I also admire the work Alex has done
to try and get it working for the rest of us because it's clearly the way
of the future. But for me right now, I feel it's simply too disruptive and
100K+ patches are not on my agenda. I'd rather wait for upstream packages
to catch up before trying to support UTF-8. Yes, it might take a while..


Unsubscribe: See the above information page

Reply via email to