Closed Bug 156336 Opened 22 years ago Closed 22 years ago

Creating folders with user defined characters doesn't work right

Categories

(MailNews Core :: Internationalization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: mkaply, Assigned: nhottanscp)

Details

(Keywords: hang)

Attachments

(1 file, 3 obsolete files)

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.
Attached patch Workaround for problem (obsolete) — Splinter Review
Display an error message if unicode conversion fails.
Attached patch Another workaround for problem (obsolete) — Splinter Review
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.
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 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+
Attachment #90533 - Attachment is obsolete: true
Attachment #92257 - Attachment is obsolete: true
Comment on attachment 98463 [details] [diff] [review]
Merged the patch (attachment 90533 [details] [diff] [review]) to the trunk.

copy 'r'
Attachment #98463 - Flags: review+
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 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+
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.
Attachment #98463 - Attachment is obsolete: true
Comment on attachment 98486 [details] [diff] [review]
Changed the wording as suggested.

copy r/sr
Attachment #98486 - Flags: superreview+
Attachment #98486 - Flags: review+
checked in to the trunk, thank you mike!
Status: ASSIGNED → RESOLVED
Closed: 22 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.

Attachment

General

Created:
Updated:
Size: