Closed Bug 346760 Opened 14 years ago Closed 14 years ago

shouldn't require type=unichar for non-ASCII prefs

Categories

(Toolkit :: Preferences, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Biesinger, Assigned: Callek)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/preferences.xml#282
http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/preferences.xml#317

Apparently there's both a string and a unichar type for prefs.

However, I don't think this is a good idea... for ASCII values, the two methods produce an identical result, while for non-ASCII values, the string type produces a really bad result.

Therefore, I don't see any downside for making string behave exactly like unichar.

NOTE: The reason I'm filing this is because entering a proxy with a nonascii hostname fails somewhat badly at the moment, due to it using type=string rather than type=unichar

Also: as another datapoint, seamonkey stores type=string prefs as unichar prefs (i.e. via nsISupportsString)
Seems reasonable to me. I guess nsIPrefBranch is frozen :-| otherwise you could just remove *CharPref. 

This should work without incident, if what biesi says in c#0 is correct.
Attachment #231541 - Flags: first-review?(bugs)
Attachment #231541 - Attachment description: make tpe="string" do the same as type="unichar" → make type="string" do the same as type="unichar"
OS: Linux → All
Hardware: PC → All
Comment on attachment 231541 [details] [diff] [review]
make type="string" do the same as type="unichar"

r=ben@mozilla.org
Attachment #231541 - Flags: first-review?(bugs) → first-review+
Whiteboard: [needs checkin]
Whiteboard: [needs checkin] → [checkin needed]
checked in by db48x
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Comment on attachment 231541 [details] [diff] [review]
make type="string" do the same as type="unichar"

this has baked on trunk, very low-risk for decent reward (based on biesi's comments in c#0)
Attachment #231541 - Flags: approval1.8.1?
Target Milestone: --- → mozilla1.8.1beta2
Version: unspecified → 1.8 Branch
Target Milestone: mozilla1.8.1beta2 → ---
Assignee: nobody → bugspam.Callek
Comment on attachment 231541 [details] [diff] [review]
make type="string" do the same as type="unichar"

a=drivers, please land on the branch.
Attachment #231541 - Flags: approval1.8.1? → approval1.8.1+
checked into 1.8 branch by db48x
Keywords: fixed1.8.1
erm s/db48x/redfive%acm.org/ sorry :(
You need to log in before you can comment on or make changes to this bug.