<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 23 January 2015 at 18:55, Yunzhong Gao <span dir="ltr"><<a href="mailto:Yunzhong_Gao@playstation.sony.com" target="_blank">Yunzhong_Gao@playstation.sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rafael, Reid, David, thanks for the reviews. I separated the UTF-8 BOM part of the patch into <a href="http://reviews.llvm.org/D7156" target="_blank">http://reviews.llvm.org/D7156</a>.<br>
It sounds like the support for Shift-JIS encoded files may be specific only to Sony platforms, is that true? I am kinda curious to hear from someone developing in Japanese environment. In writing the original patch, I was making the assumption that if a text file on Windows does not start with the BOM sequence, then it is using the current codepage. That seems to be the case for files created from Notepad, but of course these files can be created from many different sources. If this assumption is not valid, then I wonder what would be a good way to differentiate a UTF-8 file from a current-codepage one; maybe a command-line option?<br>
Thoughts and advice are appreciated,<br>
<br></blockquote><div><br></div><div>Thanks for splitting the patch!</div><div><br></div><div>When Rafael Auler implemented the bits for *writing* response files from clang, I think the observed behavior was</div><div><br></div><div>* GNU tools use the current codepage.</div><div>* MS Tools use UTF-16 only.</div><div>* Clang uses UTF-16 or UTF-8 (non-BOM)</div><div><br></div><div>The first part of you patch adds support for UTF-8 BOM, which I think is a strict improvement.</div><div><br></div><div>The change to assume current codepage in a tool that can handle utf is what I think is problematic, since there is no precedent for it (that I know of).</div><div><br></div><div>Response files are small (relative to the work they cause), so maybe one options would be to try to check if the file is UTF-8 and fallback to current codepage if that fails.</div><div><br></div><div>Cheers,</div><div>Rafael</div><div><br></div></div></div></div>