Closed Bug 24864 Opened 20 years ago Closed 20 years ago

Int. chars dont get correctly into the "Save Attachment" dialog

Categories

(MailNews Core :: Internationalization, defect, P3)

x86
Windows 98
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

If I have a attachment called "æøå.jpg" and press on the file name in the 
dropdown attachment box when reading mail the filename get translated into:
æøå.jpg

using 2000012208
Reassign to ducarroz.
Assignee: nhotta → ducarroz
Looks like we need some more translation to platform specific characters set.
Jeff, do you have another bug like that?
I think that this issue is as same as BUG 22863 ??

The file widget problem 22863/23384 is fixed (at least for windows). But I still 
don't see it correctly. Could be UTF-8 to UCS2 conversion problem (as the 
European characters got doubled from its original size, which happens in UTF-8).
Accepting
Status: NEW → ASSIGNED
Target Milestone: M14
Here is the fix:
Index: nsMessenger.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/src/nsMessenger.cpp,v
retrieving revision 1.138
diff -r1.138 nsMessenger.cpp
421c421,439
<           rv = fileSpec->ChooseOutputFile("Save Attachment", nsUnescape(unescapedDisplayName),
---
>           nsUnescape(unescapedDisplayName);
> 
>           /* we need to convert the UTF-8 fileName to platform specific character set.
>              The display name is in UTF-8 because it has been escaped from JS
>           */ 
>           
>           nsAutoString tempStr;
>           rv = ConvertToUnicode("UTF-8", unescapedDisplayName, tempStr);
>           if (NS_SUCCEEDED(rv))
>           {
>             char * tempCStr;
>             rv = ConvertFromUnicode(nsMsgI18NFileSystemCharset(), tempStr, &tempCStr);
>             if (NS_SUCCEEDED(rv))
>             {
>                 nsCRT::free(unescapedDisplayName);
>                 unescapedDisplayName = tempCStr;
>             }
>           }      
>           rv = fileSpec->ChooseOutputFile("Save Attachment", unescapedDisplayName,
1515c1533
<       rv = nsMsgI18NSaveAsCharset(TEXT_PLAIN, (const char *)nsAutoCString(msgCompFileSystemCharset()), 
---
>       rv = nsMsgI18NSaveAsCharset(TEXT_PLAIN, (const char *)nsAutoCString(nsMsgI18NFileSystemCharset()), 
Whiteboard: Fix in hand
moving to M15
Target Milestone: M14 → M15
Fixed and checked in
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
seems to be working now...:)
sure it's working, I have tested it against French 8 bits characters. Sorry, I haven't tested it against Danish words ;-
)
Verified!
Status: RESOLVED → VERIFIED
gemal. You should take credit for doing this. 
Changed the QA contact to gemal@gemal.dk
QA Contact: momoi → gemal
Does somebody have verifiy it against japanese characters?
Whiteboard: Fix in hand
Should have added this comment before.
The file name is shown correctly when it is in Japanese
also.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.