Closed
Bug 613440
Opened 14 years ago
Closed 14 years ago
Cannot load ICM profile if profile path is non-ASCII
Categories
(Core :: Graphics: Color Management, defect)
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: m_kato, Assigned: m_kato)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxWindowsPlatform.cpp?mark=617-632#617
631 qcms_profile* profile =
632 qcms_profile_from_path(NS_ConvertUTF16toUTF8(str).get());
http://mxr.mozilla.org/mozilla-central/source/gfx/qcms/iccread.c?mark=813-816#813
813 qcms_profile* qcms_profile_from_path(const char *path)
814 {
815 qcms_profile *profile = NULL;
816 FILE *file = fopen(path, "rb");
ANSI C function on Windows cannot handle UTF8 path. It uses native charset such as Shift JIS. We should use wide C function on Windows without conversion.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #496095 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #496097 -
Flags: review?(jmuizelaar)
Comment 3•14 years ago
|
||
I think it would be cleaner if the platform specific logic wasn't exposed by the interface (by having specifics profile_from method) but if it was rather handled internally in qcms_profile_from_path.
Comment 4•14 years ago
|
||
(In reply to comment #3)
> I think it would be cleaner if the platform specific logic wasn't exposed by
> the interface (by having specifics profile_from method) but if it was rather
> handled internally in qcms_profile_from_path.
The problem with this approach is that it's not clear to me what the type of the path parameter should be. Currently, the path parameter's definition matches fopen. Since, fopen is broken on Windows I think it makes sense to expose a separate function that uses wfopen.
OS: Windows Vista → Windows 2000
Updated•14 years ago
|
Attachment #496097 -
Flags: review?(jmuizelaar) → review+
Comment 6•14 years ago
|
||
Flags: in-testsuite?
Whiteboard: fixed-in-cedar
Comment 7•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
No longer depends on: post2.0
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•