AFAIK Clang assumes that everything that comes from the command line is UTF8 encoded.<br><br><div class="gmail_quote">On Tue, Jan 17, 2012 at 4:28 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com">klimek@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Dec 24, 2011 at 9:52 AM, Nikola Smiljanic <<a href="mailto:popizdeh@gmail.com">popizdeh@gmail.com</a>> wrote:<br>


><br>
> On Tue, Dec 6, 2011 at 11:27 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>
>><br>
>><br>
>> Are there open bugs? A quick search for unicode on <a href="http://llvm.org/bugs" target="_blank">llvm.org/bugs</a><br>
>> didn't show anything windows specific.<br>
>><br>
><br>
> There'sĀ <a href="http://llvm.org/bugs/show_bug.cgi?id=10348" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=10348</a><br>
><br>
> I've been trying to fix it but can't get anyone to review the patches (Aaron<br>
> Ballman did a review but he doesn't have commit access). The problem is that<br>
> ::stat function can't handle UTF8 paths on Windows. My solution was to get<br>
> the command line arguments as UTF16 and convert them to UTF8 and then<br>
> convert them back to UTF16 before calling ::_wstat. The problem is that stat<br>
> structure is used throughout the code base, and ::_wstat has different<br>
> parameter type. This solution is far from perfect. It seems to me that what<br>
> you'reĀ discussing would solve this issue in a more general way (maybe even<br>
> fix all the mess with struct stat *StatBuf being passed around)?<br>
<br>
</div></div>Thanks a lot for the pointer. Why did you need to convert the file<br>
names to UTF8 instead of just leaving them as UTF16 throughout the app<br>
and using wstat everywhere? Are there places in clang that assume a<br>
certain encoding of file names?<br>
<br>
Cheers,<br>
/Manuel<br>
</blockquote></div><br>