Creating folders with user defined characters doesn't work right

RESOLVED FIXED in mozilla1.2beta

Status

MailNews Core
Internationalization
RESOLVED FIXED
16 years ago
10 years ago

People

(Reporter: mkaply, Assigned: nhottanscp)

Tracking

({hang})

Trunk
mozilla1.2beta

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

16 years ago
We're experiencing this problem on OS/2, but looking at the code, it will fail 
elsewhere as well.

Basically, if you create a folder on a Chinese system with a user defined 
character (like FE50 for instance) the create will fail, on OS/2 it hangs 
(which probably happens on other platforms)

This is difficult to fix, because it would require switching mailnews to use 
nsLocalFile instead of filespec to work properly.

My current fix is simply to add an error message and fail gracefully.
(Reporter)

Comment 1

16 years ago
Created attachment 90533 [details] [diff] [review]
Workaround for problem

Display an error message if unicode conversion fails.

Comment 2

16 years ago
Created attachment 92257 [details] [diff] [review]
Another workaround for problem

This code takes the hex value of a user defined character and uses that in the
folder name. It will replace characters with their hex value if they're
undefined. It will create the folder, but after restarting the browser you will
no longer see the original name; you will see the name that the folder got
saved as with its hex values.

Using this code will create a folder with a unique name and not cause the
browser to hang, but the folder name will not be exactly as the user wanted it.
(Assignee)

Comment 3

16 years ago
I think we can just pop up the alert and let the user to name it differently (so
I prefer the first patch).
Status: NEW → ASSIGNED
Keywords: hang
Target Milestone: --- → mozilla1.2beta

Comment 4

16 years ago
Comment on attachment 90533 [details] [diff] [review]
Workaround for problem

r=naving. I think this is the correct fix because creating w/ some other name
would confuse the user.
Attachment #90533 - Flags: review+
(Assignee)

Comment 5

16 years ago
Created attachment 98463 [details] [diff] [review]
Merged the patch (attachment 90533 [details] [diff] [review]) to the trunk.
Attachment #90533 - Attachment is obsolete: true
Attachment #92257 - Attachment is obsolete: true
(Assignee)

Comment 6

16 years ago
Comment on attachment 98463 [details] [diff] [review]
Merged the patch (attachment 90533 [details] [diff] [review]) to the trunk.

copy 'r'
Attachment #98463 - Flags: review+

Comment 7

16 years ago
You need to check with doc people before adding an error message. I'll sr it,
but you need to get approval for the wording before checking in.

Comment 8

16 years ago
Comment on attachment 98463 [details] [diff] [review]
Merged the patch (attachment 90533 [details] [diff] [review]) to the trunk.

sr=bienvenu, but get signoff on the error msg wording from Jen or Robin. Thx!
Attachment #98463 - Flags: superreview+

Comment 9

16 years ago
Suggested wording: 

+folderCreationFailed=The folder could not be created because the folder name
you specified contains an unrecognized character. Please enter a different name
and try again.
(Assignee)

Comment 10

16 years ago
Created attachment 98486 [details] [diff] [review]
Changed the wording as suggested.
Attachment #98463 - Attachment is obsolete: true
(Assignee)

Comment 11

16 years ago
Comment on attachment 98486 [details] [diff] [review]
Changed the wording as suggested.

copy r/sr
Attachment #98486 - Flags: superreview+
Attachment #98486 - Flags: review+
(Assignee)

Comment 12

16 years ago
checked in to the trunk, thank you mike!
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.