On 2014-01-17 4:39 AM, Henri Sivonen wrote:
On Thu, Jan 16, 2014 at 7:28 PM, ISHIKAWA,chiaki <ishik...@yk.rim.or.jp> wrote:
I found that TB generates during its execution
UTF-8 file path name strings WITHOUT BOM and
still contain supposedly a valid UTF8 path name.

I'm pretty sure that file system paths on Linux are not supposed to
contain a BOM.

I'm certain they MUST NOT contain a BOM (in the RFC sense). Including a BOM would break code all over the place that assumes that filesystem paths can be concatenated with strcat(), that a path is absolute if and only if path[0] == '/', etc.

All this use of iconv is sad, yes. I wouldn't be opposed to dropping
the iconv code paths and using the OS X / Android code (that assumes
that operating system's file system APIs always take UTF-8) for all
*nix platforms.

I'm going to do a little more research -- if I remember correctly, the Python crew tried to do this in their 3.0 release and ran into some trouble with it, and they came up with a more robust solution later in the 3.x series.

zw
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to