Open
Bug 701717
Opened 13 years ago
Updated 2 years ago
Clean up nsLocalFileWin code that duplicates NSPR functions
Categories
(Core :: XPCOM, defect)
Tracking
()
NEW
People
(Reporter: ted, Unassigned)
References
()
Details
The code comment linked in the URL field says that there are functions copied from NSPR into nsLocalFileWin.cpp because NSPR doesn't have UTF-16 support for pre-NT4 platforms. Since we no longer support those platforms, we should clean up this code and just make it use NSPR or the Win32 Unicode APIs directly.
Comment 1•13 years ago
|
||
Hm, the problem with NSPR is that it calls the ANSI versions of Win32 APIs (which do *not* support UTF-8, only the system code page [1]), not the Unicode versions. For instance, https://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/src/md/windows/ntio.c#3137 calls MoveFile with char* arguments, which obviously means it's calling MoveFileA, not MoveFileW. What it effectively means is that NSPR's file handling is buggy and unreliable, and should not be used in any shipping code.
As far as I can tell, the only ways to fix this are to either move NSPR wholesale to UTF-16 (probably not what we want to do), or to rewrite all the Windows NT code to convert to UTF-16 each time we need to call a Win32 API.
[1] http://blogs.msdn.com/b/michkap/archive/2006/10/11/816996.aspx
Comment 2•12 years ago
|
||
See bug 622085 where there is a patch to do this for opendir/readdir/closedir.
Depends on: 622085
Updated•3 years ago
|
Severity: normal → S3
Updated•2 years ago
|
Severity: S3 → --
Updated•2 years ago
|
Severity: -- → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•