[cfe-dev] [LLVMdev] LLVM & Clang file management

Manuel Klimek klimek at google.com
Tue Jan 17 07:28:34 PST 2012

On Sat, Dec 24, 2011 at 9:52 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> On Tue, Dec 6, 2011 at 11:27 AM, Manuel Klimek <klimek at google.com> wrote:
>> Are there open bugs? A quick search for unicode on llvm.org/bugs
>> didn't show anything windows specific.
> There'sĀ http://llvm.org/bugs/show_bug.cgi?id=10348
> I've been trying to fix it but can't get anyone to review the patches (Aaron
> Ballman did a review but he doesn't have commit access). The problem is that
> ::stat function can't handle UTF8 paths on Windows. My solution was to get
> the command line arguments as UTF16 and convert them to UTF8 and then
> convert them back to UTF16 before calling ::_wstat. The problem is that stat
> structure is used throughout the code base, and ::_wstat has different
> parameter type. This solution is far from perfect. It seems to me that what
> you'reĀ discussing would solve this issue in a more general way (maybe even
> fix all the mess with struct stat *StatBuf being passed around)?

Thanks a lot for the pointer. Why did you need to convert the file
names to UTF8 instead of just leaving them as UTF16 throughout the app
and using wstat everywhere? Are there places in clang that assume a
certain encoding of file names?


More information about the cfe-dev mailing list