Clang can not compile file with chinese name.

Hi All:

I am using Clang 3.3 on Windows7. I compiled tow Clang 3.3, one by vs2008 and another by vs2010.

But both of them can not compile file with chinese name.

How can I resolve this problem?


FWIW, I think this is an issue specific to Clang on Windows. This works for me on Linux:

sean:~/tmp % cat 汉语.cpp
#include <stdio.h>

int main() {
printf(“Inside 汉语.cpp\n”);
return 0;
sean:~/tmp % clang++ 汉语.cpp
sean:~/tmp % ./a.out
Inside 汉语.cpp

(I have no idea what “汉语” means, btw; I just grabbed the first Chinese text I could find)

– Sean Silva

Yep it’s a windows issue, my patch was never applied. More info here

(random note: 汉语 is simplified chinese and basically means “the chinese language family”)

You should start by showing the error message. "It doesn't work" isn't
helpful in diagnosing your problem.


I have a patch for shift-jis Japanese file names on Windows that I will post to the mailing list shortly. That should fix the Chinese file name issue as well.
I have not looked at Nikola’s patch. Will do.

  • Gao