bug-bash
[Top][All Lists]
Advanced

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

Re: Encoding oddity


From: Chet Ramey
Subject: Re: Encoding oddity
Date: Fri, 10 Dec 2010 09:07:30 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 12/10/10 6:42 AM, Richard wrote:
> Hi!
> 
> On 10. des. 2010, at 11.56, Dennis Williamson wrote:
> --snippet--
>>
>> No, I meant to use the echo separately so you could see what the glob was 
>> doing.
>>
>> I'm sorry, because of the way I tested it, I made a mistake in what I
>> posted. The line should be as you originally had it. It should work.
>>
>> It sounds like there's a problem with your locale. What does the
>> locale command output?
> --/snippet--
> 
> I have tested the same script under Linux and that works fine.
> I changed the Locale for OS X, but the result is the same: It does not work . 
> . .

This is an issue peculiar to Mac OS X.  The Mac file system stores
filenames as decomposed Unicode characters.  Everything else in the
system, including file data and characters entered at the keyboard,
uses precomposed Unicode.  The Finder and some portions of the system
perform the conversion from decomposed to precomposed when mediating
between the file system and the user, but there's no corresponding
conversion performed by what Apple calls "the BSD layer" (basically,
readdir).

I added "file system transformation" functions to bash and filename
rewrite function hooks to readline to deal with this in bash-4.1, but
Apple uses bash-3.2.

Chet

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