Christian Brabandt wrote: > Am 2015-04-20 18:28, schrieb Charles Campbell: >> I've attached a small tarball illustrating the problem I'm having with >> expand(). >> >> gunzip jose.tar.gz >> tar xf jose.tar >> cd josé >> vi junk.vim >> :so % >> :echo x[4] >> :echo y[4] >> >> With the first echo, you'll see (using utf-8 for encoding) <e9>. This >> is the hex code for a é. The second echo shows <c3>. >> >> :echo x >> >> shows /jos<e9>/junk.vim >> >> :echo y >> >> shows /josé/junk.vim >> >> This problem has some definitely unwanted effects. At least one person >> redid their home directory's name to avoid the accent, because netrw >> won't display it correctly (or use it correctly) because of this bug. > > That is an encoding issue. The 'é' in your tar archive is latin1 encoded > while your Vim tries to read it as utf-8. BTW: How does the shell > display it? Somehow the shell should know the encoding, so you might > check the output of the locale command and try to use iconv() like this: > iconv(expand("%:p"), 'latin1', 'utf-8') > > BTW: There is a patch in the todo list, that should fix that issue. > Search for 'systemencoding' Hello, Christian:
Sorry for taking awhile to reply to this. Looks like you're quite right -- it was an encoding issue. When I make a "josé" directory using utf-8 it does show up with netrw correctly (with which I'm using utf-8). Regards, Chip Campbell -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.