Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [OSX] weird UTF-8 behavior with cd autocompletion



On Thu, 11 Feb 2010, Xavier GuÃrin wrote:

> Dear list,
> 
> I'm encountering a small issue with my ZSHs, both 4.3.9 and 4.3.10 
> devel.  Although UTF-8 works fine, autocompletion with the CD command 
> produces a weird output.
> 
> For instance, let's take this directory structure:
> 
> ~/Documents/
> ~/Documents/ConfÃrence
> 
> And the following command :
> 
> $ cd ~/Documents/Conf + <TAB>
> 
> I get the following output:
> 
> $ cd ~/Documents/Confe<0301>rences/
> 
> My terminal.app is configured with UTF-8 encoding, and both LANG and 
> LC_ALL are set as "fr_FR.UTF-8".
> 
> Do you have any idea how I could fixe that ?

The problem is that HFS+ stores filenames in Unicode Normalization Form 
D (D = Decomposed).  So, even though this character exists:

à 00e9  LATIN SMALL LETTER E WITH ACUTE

On disk, it's stored as:
e  0065  LATIN SMALL LETTER E
   0301  COMBINING ACUTE ACCENT

That's the diagnosis.  Don't know the cure.

-- 
Best,
Ben


Messages sorted by: Reverse Date, Date, Thread, Author