Last Comment Bug 193358 - Unable to open files with chinese (unicode) file names with File|Open and drag&drop
: Unable to open files with chinese (unicode) file names with File|Open and dra...
Status: RESOLVED FIXED
: intl
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: x86 Windows 2000
-- normal with 5 votes (vote)
: ---
Assigned To: Simon Montagu :smontagu
: Yuying Long
: Makoto Kato [:m_kato]
Mentors:
: 88292 320785 (view as bug list)
Depends on: 162361 278161
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-14 09:10 PST by Andre-John Mas
Modified: 2006-11-02 08:54 PST (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Arabic file that can't be handled with mozilla (1.71 KB, text/html)
2003-08-21 01:52 PDT, erik johansson
no flags Details

Description User image Andre-John Mas 2003-02-14 09:10:52 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

I have a file which has Chinese characters in its file name, though when I try
to open the file, either from the open dialogue or by a drag and drop I get told
that  the file e:\?????\ can not be opened.

Reproducible: Always

Steps to Reproduce:
1. Take a file that has Chinese characters and that is displayed in Explorer
with Chinese characters (requires the Chinese language pack)
2. Drag it to a Mozilla Window
3. Observe the error dialogue

Actual Results:  
Error message

Expected Results:  
File should have been opened

- If I open the file by a drag-and-drop from Explorer then the file gets
displayed in the error dialog as e:\?????.lrc
- If I open the file via the open dialog then the file gets displayed in the
error dialog as e:\_____.lrc
- If I try viewing the directory containing the files with chinese file names
then I only see the files that don't have chinese characters in them.
- I can drag such a file to the attachments pane of the Mail Composition window
though it will display the Chinese characters as question marks and then when I
try sending the e-mail it will just act as if its doing something useful
Comment 1 User image Boris Zbarsky [:bz] (still a bit busy) 2003-02-14 09:17:26 PST
To intl; I bet this is more "unicode" breakage.
Comment 2 User image Yuying Long 2003-02-14 10:31:50 PST
This case happens with when you running a non-native Chinese OS.

What about if you change your system locale to Chinese?
Comment 3 User image Andre-John Mas 2003-06-12 08:01:47 PDT
I don't have access to a chinese based WindowsOS. I am also having this same
problem with Mozilla 1.4rc1 on Windows 2000 and trying to save a page in
cyrillic. As an example take the page http://www.utro.ru/ and then try saving it
as 'web-page, complete'. Where I should be seeing cyrillic characters I see
underscores, so (example pasted with view set to ISO-8859-1, so I am not sure
that it will come through right - bugzilla needs to be updated to support UTF-8):

  YTPO.ru - ежедневная e-газета

appears as

  YTPO.ru - __________ e-_______

Not the same thing. This really needs to be resolved.

Comment 4 User image erik johansson 2003-08-21 01:52:05 PDT
Created attachment 130167 [details]
Arabic file that can't be handled with  mozilla 

You might have to use a unicode clean browser to open this file. This file was
saved on a Win98 Arabic system and then move on diskett to a WinXP from which I
am submitting this. So I hope everything is alrigth
Comment 5 User image erik johansson 2003-08-21 01:55:10 PDT
Confirmed on WinXP with mozila 1.5a, but with arabic filenames. This is a
unicode issue, you need to add support to open unicode files. 

Try typing:
file:///C:/%D8%A9%D8%B1.htm

this displays a dialog saying that it coldn't find (two arabic characters).htm  

There are lots of programs that don't support this (like WinZIP, but IE andWord
does it flawlessly) I supplied a file that bugzilla probably fscked the filename.
Comment 6 User image Roy Yokoyama 2003-08-21 10:52:33 PDT
The code to fix this was checked-in a while back (#ifdef is not enabled though)
when we convert the  mozilla as an Unicode app (104934)

NSPR needs to turn the #ifdef on to fix this and other unicode File I/O related
bugs. (88103, 85836, 84384, 88292, 108000 and more)

cc Wan-Teh for the status
Comment 7 User image Jungshik Shin 2003-08-21 12:24:12 PDT
See also bug 162361. With the patch(attachment 125603 [details] [diff] [review]) there(my Win32 build is 
always made with that patch :-)), I can mix Cyrillic, Devanagari, Chinese, 
Greek  and all sort of characters in a single file name. See also
a thread of articles beginning with 
news://news.mozilla.org/bfe3c5$4ha2@ripley.netscape.com
and news://news.mozilla.org/bfr3cc$nfg1@ripley.netscape.com


Comment 8 User image Jungshik Shin 2003-08-21 12:36:14 PDT
> I don't have access to a chinese based WindowsOS.
 
If you have Win2k/XP, then you have a Chinese(Korean, French, Arabic, Hebrew, 
Hindi, Thai, German, Japanese, Tamil, Russian ....) based Windows :-). Being a 
fully Unicodized OS, Win2k/XP can be made to run under any locale supported by 
them. Go to the control panel | language/country option. Set your default 
system locale to Chinese and reboot. This is by NO means to say that this bug 
is not to be fixed. This and a bunch of other bugs (to make Mozilla take the 
full advantage of Win2k/XP's Unicode support while still making it on non-
Unicode based old Win9x/ME) have to be fixed soon because people like you and 
me want to use multiple scripts at a time. 

wtc, have you decided what to do with NSPR Unicode APIs (UTF-8 vs UTF-16)? 
Comment 9 User image 石庭豐 (Seak, Teng-Fong) 2004-09-27 22:25:12 PDT
Just like IE in which some DLL's are now different for Win9x, ME, NT and 2K/XP,
what about Mozilla making two builds for 9x/ME and NT/2K/XP?  I know that might
be annoying with respect to compiling, but that should build more efficient codes.
Comment 10 User image Justin Kerk 2004-09-29 16:44:51 PDT
Dupe of bug 108000?
Comment 11 User image Andre-John Mas 2004-09-29 17:40:01 PDT
Sounds like a dupe.

BTW I am adding this bug as depending on bug 239279. Once that bug has been
dealt with this one should automagically be corrected.
Comment 12 User image 石庭豐 (Seak, Teng-Fong) 2004-09-29 22:56:13 PDT
(In reply to comment #10)
> Dupe of bug 108000?

I wouldn't mark this bug as a dupe because bug 108000 is a *meta bug*, ie a
reminder of all relevant bugs.  It talks just about Unicode filename support,
but doesn't specify what.  It could be eg opening an Html file in browser,
opening the same file in composer, saving a page using unicode filename,
attaching a unicode filename in mail, saving it back, etc etc.

However, IMO, we could make this bug depend on that.

OTOH, This bug depends on bug 162361 which depends on bug 239279, so I'm not
sure if it's necessary to mark this bug as dependent on bug 239279.
Comment 13 User image Michael Stanley-Baker 2004-11-18 14:46:40 PST
> If you have Win2k/XP, then you have a Chinese(Korean, French, Arabic, Hebrew, 
> Hindi, Thai, German, Japanese, Tamil, Russian ....) based Windows :-). Being a 
> fully Unicodized OS, Win2k/XP can be made to run under any locale supported by 
> them. Go to the control panel | language/country option. Set your default 
> system locale to Chinese and reboot. 

This does not enable the opening of Chinese language files either, because the
"Chinese" system only provides an overlay translation of menus, and some message
window components.  It still scrambles system messages and other elements, and
is not a 'true Chinese' XP.  Running many Chinese-only based softwares (such as
early Dr. Eye versions and Ziran Shurufa 2003) results in scrambled text in
window boxes &c.  
I use multiple language file names quite frequently, and many are HTML downloads
from the web, and these remain unopenable in this latest version of Firefox. 
This bug seems to have been open for a year and a half - is it very hard to fix?
Comment 14 User image 石庭豐 (Seak, Teng-Fong) 2004-11-18 15:33:43 PST
Michael, you're talking about MUI (Multi-language User Interface) for English
based Win2k/XP only.

It's different from changing system locale (eg in XP: Control Panel > Regional
Setting > Advanced option tab > "Non Unicode program")
Comment 15 User image Jungshik Shin 2004-11-18 22:26:24 PST
(In reply to comment #13)

> This does not enable the opening of Chinese language files either, 

It should unless you try to open a file with SC name with the default system
locale set to TC or vice versa. 

> is not a 'true Chinese' XP.  

There's nothing special about Chinese XP except for  menus, help and etc
translated into Chinese. 

> Running many Chinese-only based softwares (such as
> early Dr. Eye versions and Ziran Shurufa 2003) results in scrambled text in
> window boxes &c.  

  If they're Unicode-based programs, they should work flawlessly regarldess of
the default system locale on *any* language versions of Windows XP. If they're
non-Unicode-based programs, they should run fine after switching the default
system locale to TC or SC (depending on which non-Unicode code page they use, 
CP936 or CP950)

> I use multiple language file names quite frequently, and many are HTML downloads
> from the web, and these remain unopenable in this latest version of Firefox. 

See bug 162361 and bug 239279. We're working on it, but none of us has enough
free time to fix it very soon (we know what to do, but don't have time)
Comment 16 User image Elmar Ludwig 2005-12-19 01:22:07 PST
*** Bug 320785 has been marked as a duplicate of this bug. ***
Comment 17 User image Jungshik Shin 2006-04-04 19:53:44 PDT
Now fixed on trunk  thanks to patches for bug 162361 and bug 278161
Comment 18 User image Jungshik Shin 2006-04-04 19:55:51 PDT
*** Bug 88292 has been marked as a duplicate of this bug. ***
Comment 19 User image 石庭豐 (Seak, Teng-Fong) 2006-11-01 09:58:30 PST
I've just downloaded Firefox 2 and tried to verify if this bug is resolved. Doing a drag 'n drop does indeed work.  Bravo!! :D  However, if I double-clicked on the same file, it doesn't work.

"open files" as written in the summary can mean a lot of things, amongst them:
1. Drag 'n drop
2. Double-click (ie lauched by Windows Explorer)
3. Through File menu's "Open File ..."
4. In command line (or called by another program?)

I've verified that point 1 and point 3 work, but point 2 failed (I can't check point 4 since it's impossible for me to type Unicode in console), so do anyone mind if I reopen this bug?  Or do you prefer another bug report?
Comment 20 User image Andre-John Mas 2006-11-01 11:25:48 PST
I can confirm point 2 in comment 19 is still an issue. My test:

  - create a filename with non-latin characters (used character map)
    for example '萔菾菰萩쫦쪹.html'
  - double-click that file
  
The result:

   Firefox can't find the file at /C:/tmp/??????.html.

This should be reopened, since it is still broken for this issue.
Comment 21 User image Jungshik Shin 2006-11-02 08:40:19 PST
(In reply to comment #19)

> 2. Double-click (ie lauched by Windows Explorer)
> 3. Through File menu's "Open File ..."
> 4. In command line (or called by another program?)

Please, see bug 162361 comment #180 and a few more comments below it. See also bug 282285.

Comment 22 User image Jungshik Shin 2006-11-02 08:54:49 PST
filed bug 359200 to track issue #2 explicitly.

Note You need to log in before you can comment on or make changes to this bug.