[LLVMdev] [cfe-dev] Unicode path handling on Windows (original) (raw)
Nikola Smiljanic popizdeh at gmail.com
Mon Sep 5 22:52:01 PDT 2011
- Previous message: [LLVMdev] [cfe-dev] Unicode path handling on Windows
- Next message: [LLVMdev] [cfe-dev] Unicode path handling on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think I got it this time. I realized that ::open and ::stat work just fine with multibyte paths on windows so there's no need to change this code. The only problem is llvm::sys::fs module which falsely assumes that input strings are UTF8 encoded when they are in fact multibyte strings.
Now I really hope I haven't broken anything because llvm::sys::fs::exists is called in a number of places, but I'm guessing that none of the paths that are passed to it are really UTF8?
I think entire llvm::sys::fs module should be changed to use MultibyteToUTF16 instead of UTF8ToUTF16 before calling windows api functions (unless somebody knows that we actually have UTF8 paths on windows somewhere in the code)? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110906/065214f9/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: PathV2.inc.patch Type: application/octet-stream Size: 1469 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110906/065214f9/attachment.obj>
- Previous message: [LLVMdev] [cfe-dev] Unicode path handling on Windows
- Next message: [LLVMdev] [cfe-dev] Unicode path handling on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]