On 3/1/14, 4:12 PM, Yuri wrote:
> When I accidentally type some nonexistent command containing UTF8
> characters, an error has UTF8 characters expanded:
> $ ЫZZZ
> bash: $'\320\253ZZZ': command not found
> 
> I think bash shouldn't discriminate against UTF8 characters in error
> messages, and shouldn't expand them. If some international users wish to
> have UTF8 in their commands, bash should preserve them in all messages.
> 
> My LANG is en_US.UTF-8, and changing it to ru_RU.UTF-8 doesn't seem to make
> a difference. Same with LC_ALL.

This depends on your system, your locale, and your bash version.  On
Mac OS X, bash-4.2 and bash-4.3 don't use the $'...' notation.  On RHEL5,
bash-4.2 uses the $'...' notation and bash-4.3 does not.  Other systems
are similar.

Bash-4.3 does do things differently than bash-4.2: it checks whether or
not a wide character corresponding to a multibyte character is printable
using iswprint and uses $'...' if that tests false.  Bash-4.2 relies
primarily on the behavior of isprint().

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

Reply via email to