Friday, May 9, 2008

Wine and non-English File Names

I'm currently writing a tiny console application for Windows. It's written in C and I use the MinGW cross compiler to compile it and I use Wine (the WINdows Emulator) to test it under Linux. I expect to have more to say about this application when it's ready, but till then let me just say that it's meant to read and write lots of files.

One problem that I've hit with Wine is that my program fails to access files with names that contain non-English characters. A quick search brought me to this message on the wine-users mailing list archive.

So here's how to make it work for Hebrew, with UTF-8 encoded file names on the disk:
LC_ALL=he_IL.UTF-8 wine program.exe <arguments> | iconv -f windows-1255
The output is piped through iconv to convert it back to UTF-8.


  1. Does this mean that you use bash or other non-(t)csh shell?

  2. bash. It's the default on Debian.