9
1
I just started using zsh, and love it. However, I've stumbled upon an annoyance when it comes to international characters:
➜ ~ touch åäö.txt
➜ ~ ls
Desktop Dropbox Music Sites
Documents Library Pictures a??a??o??.txt
Downloads Movies Public
➜ ~ rm -v a<030a>a<0308>o<0308>.txt
åäö.txt
➜ ~
With bash it looks like this (the filename in rm -v
is auto completed by pressing TAB in both cases).
johan@retina ~ $ touch åäö.txt
johan@retina ~ $ ls
Desktop Dropbox Music Sites
Documents Library Pictures åäö.txt
Downloads Movies Public
johan@retina ~ $ rm -v åäö.txt
åäö.txt
johan@retina ~ $
How can I fix this with zsh
?
EDIT:
Setting export LANG=en_US:UTF-8
fixes the output of e.g. ls
and also shows it properly on the line below current input when there are multiple matches on TAB-completion. However, selecting the file from TAB-completion it shows the wrong way on the input line, the same goes for when there is only one match.
The above example now looks like this with zsh
:
➜ ~ touch åäö.txt
➜ ~ ls
åäö.txy
➜ ~ rm -v a<030a>a<0308>o<0308>.txt
åäö.txt
➜ ~
If I have two files matching on TAB-completion it looks like this:
➜ ~ touch åäö.txt
➜ ~ touch öäå.txt
➜ ~ rm
öäå.txt åäö.txt
Selecting one of the above by pressing TAB again and using arrow keys, or pressing either a or o to only make one match before completion generates this:
➜ ~ rm o<0308>a<0308>a<030a>.txt
➜ ~ rm a<030a>a<0308>o<0308>.txt
Any suggestions on what's wrong?
2What's the output of
echo $LANG
inbash
resp.zsh
? – mpy – 2013-04-15T14:08:54.307It's blank for both. I'm on OS X 10.8.3 by the way. – Morgan – 2013-04-15T14:30:02.383
Ok, then I'm out (OS X), sorry. But try nevertheless e.g.
LANG=en_US.UTF-8
.zsh
should offer you all possibilities withLANG=<TAB>
, but en_US.UTF-8 works perfect with german umlauts. – mpy – 2013-04-15T14:36:27.870export LANG=en_US.UTF-8
fixed thels
output, however, the auto completion still showsa<030a>a<0308>o<0308>.txt
– Morgan – 2013-04-15T14:47:04.270Just another idea: Did you compile
– mpy – 2013-04-15T14:56:56.410zsh
yourself? If not, grab latest source (http://zsh.sourceforge.net/Arc/source.html) and be sure to use./configure --enable-multibyte
. Aftermake
just try by starting./Src/zsh
prior installing that version.It's compiled/installed with homebrew. 5.0.2 with
--enable-multibyte
. – Morgan – 2013-04-15T15:05:09.817