On Tue, Apr 28, 2009 at 3:11 PM, Erik Kay <[email protected]> wrote:
> The biggest problem with this change is that it's not possible to do this > conversion on Linux in a safe way. In Linux, there is no charset defined by > the filesystem. Each filename is just a blob of bytes. Apps are supposed > to respect an environment variable, but since this environment variable > could change over time and be different from user to user, there's no > reliable way to know what the charset is, so you can't convert from a > FilePath on Linux to UTF8 or UTF16 unless you were the one who created the > path to begin with. > But that's exactly the point. FilePath is the class that created the path to begin with. So it can know what the LC_*/LANG variables were was when it was created, and do the right conversion when you ask the FilePath to convert to UTF16. Also, if the developer calls something called FilePath::CreateFromUTF8, then it can know it was supposed to be UTF8 and remember that. -Greg. --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
