[cfe-dev] Unicode path handling on Windows

Nikola Smiljanic popizdeh at gmail.com
Thu Sep 1 23:41:48 PDT 2011


The patch should work for unicode filename, I just realized that it doesn't
work for unicode directories. FileSystemStatCache calls ::stat for
directories, and this doesn't work for utf8 input the same way ::open
doesn't work. I tried to replace it with ::_wstat but this function has a
different signature. I think we should take a different approach:

1. convert all command line input to utf8
2. rework FileSystemStatCache and MemoryBuffer to use llvm::sys::fs and
never explicitly call ::open or ::stat

llvm::sys::fs already has a status function but I'm not sure if it can be
used as ::stat replacement?
Can this module be used to open files, I couldn't find this anywhere?

2011/9/2 NAKAMURA Takumi <geek4civic at gmail.com>

> Nikola,
>
> Your patchset does not work;
>
> e>bin\clang.exe  -S なかむら\たくみ.c
> error: error reading '邵コ・ェ邵コ荵昴・郢ァ蝎らクコ貅假ソ・邵コ・ソ.c'
> 1 error generated.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110902/b8bf13bd/attachment.html>


More information about the cfe-dev mailing list