[Top][All Lists]

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

Re: Errors in commands containing UTF8 characters are printed with UTF8

From: Chet Ramey
Subject: Re: Errors in commands containing UTF8 characters are printed with UTF8 byte expansion
Date: Sun, 02 Mar 2014 17:07:01 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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().

``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]