Closed
Bug 63044
Opened 24 years ago
Closed 24 years ago
[Choose File] cannot use DBCS filename
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
VERIFIED
FIXED
People
(Reporter: m_kato, Assigned: m_kato)
References
()
Details
(Keywords: intl)
Attachments
(3 files)
|
1.37 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.37 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.02 KB,
patch
|
Details | Diff | Splinter Review |
REPRO STEP
==========
1. [Edit] - [Preferences...]
2. [Navigator] tree on [Category]
3. click [Choose File]
4. select Japanese file and click [OK]
RESULT
======
[Location] text field is incorrect. This problem
is /xpfe/components/prefwindow/resources/content/prefutilities.js
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/con0
56 function prefNavSelectFile(folderFieldId, stringId, useNative)
57 {
58 var folderField = document.getElementById(folderFieldId);
59 var dlgString = stringId ? bundle.GetStringFromName(stringId) : '';
60 var file = getFileOrFolderSpec( dlgString, false );
61 if( file != -1 )
62 {
63 /* XXX nsILocalFile doesn't have a URL string */
64 if (useNative)
65 {
66 folderField.value = file.unicodePath;
67 }
68 else
69 {
70 // Hack to get a file: url from an nsIFile
71 var tempFileSpec = Components.classes
["@mozilla.org/filespec;1"].createInstance(Components.interfaces.nsIFileSpec);
72 tempFileSpec.nativePath = file.unicodePath;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74 try {
75 var url = tempFileSpec.URLString;
76 if( url )
77 folderField.value = url;
78 }
79 catch(e) {
80 }
81 }
82 }
83 }
| Assignee | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
What functionaries are affected by this (i.e. how to confirm the bug)?
Comment 3•24 years ago
|
||
I can reproduce this on 12-12 Mtest build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: teruko → ylong
Comment 4•24 years ago
|
||
r=nhotta
I have a question for the comment.
// file.URL cannot convert DBCS filename. So we uses nsIFileURL
Is that DBCS specific or generic to non Latin1?
Also, I think "nsIFileSpec.URLString" instead of "file.URL".
So, please change the comment if you agree.
| Assignee | ||
Comment 5•24 years ago
|
||
sorry, this is mistake comment :-). I forgot that its function is not
implement on other than Windows. And it will crash when it cancels filepicker.
I attach new fix
| Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
>And it will crash when it cancels filepicker.
I am not clear, crashes with your old patch or even without your any of the patches?
| Assignee | ||
Comment 8•24 years ago
|
||
Using old patch, it will crash when you cancel filepicker dialog.
Comment 9•24 years ago
|
||
r=nhotta
So you changed getFileOrFolderSpec() to return -1 if the user canceled. Although
not related to your change, the function's return value is not consistent. It
returns "false" or -1 for error and fp.file for success.
| Assignee | ||
Comment 10•24 years ago
|
||
Sorry, hotta-san, could you review one more? (old code is not smart like your
comment).
| Assignee | ||
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
I think the return value should be unified instead of changing the caller to
check both cases (e.g. file != -1 && file != null).
| Assignee | ||
Comment 13•24 years ago
|
||
Sure.
It will be super-view process by old patch.
Thanks, hotta san.
Status: NEW → ASSIGNED
Comment 14•24 years ago
|
||
sr=alecf on the 2nd patch listed here.
| Assignee | ||
Comment 15•24 years ago
|
||
check in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
The Japanese file name shows like in [location] text field:
file:///C:/Yuying2/TESTPAGE/%83e%83X%83g.html
I don't know if it is correct or not though, cause Japanese file name display
like this way around a lots of place in N6.
Comment 17•24 years ago
|
||
I re-open the bug cause DBCS file name still not display glyph. Please change
the status if it is acceptable.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 18•24 years ago
|
||
Yuying, your comment is other bug. Because this bug is what Mozilla cannot
open DBCS file name.
Please open new bug.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
Status: RESOLVED → VERIFIED
Comment 19•24 years ago
|
||
Verified on 05-11 trunk build.
You need to log in
before you can comment on or make changes to this bug.
Description
•