Closed Bug 992179 Opened 11 years ago Closed 7 years ago

simple-prefs preference of type file does not handle non-ASCII characters properly

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: disptr, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/7.0.2 Safari/537.74.9 Steps to reproduce: 1) Create add-on with simple-prefs preference of type file. 2) Install add-on and open preferences. 3) Click on "Browse..." button and choose a file where the path contains non-ASCII characters such as å, ä or ö (Swedish characters, which is what I have tested). For this example, let's assume the path was "/home/user/åäö/file" for Mac OS X and Linux or "C:\Users\åäö\file" for Windows. 4) Inspect file name next to the "Browse..." button. Also programmatically inspect contents of the preference, or inspect using about:config. Actual results: Mac OS X: Value next to "Browse..." button is "/home/user/aao/file". Value found in about:config is "/home/user/aao/file". In both places the diacritics have disappeared, transforming "åäö" into "aao". Linux: Value next to "Browse..." button is "/home/user/aao/file". Value found in about:config is "". In the first place the diacritics have disappeared, transforming "åäö" into "aao". In the second place the value of the preference has gone missing altogether. Windows 8: Value next to "Browse..." button is "C:\Users\åäö\file". Value found in about:config is "". In the first place the diacritics have disappeared, transforming "åäö" into "aao". In the second place the value of the preference has gone missing altogether. Expected results: For all platforms, the value next to the "Browse..." button should be exactly the path which I selected using the file browser dialog, and the value found in about:config should be exactly the same.
Excuse me. I posted too hastily. Actual results for Windows 8 should be: Value next to "Browse..." button is "C:\Users\åäö\file". Value found in about:config is "". In the first place the path is correct. In the second place the value of the preference has gone missing altogether.
Component: API → General
Product: addons.mozilla.org → Add-on SDK
i believe this is a platform (toolkit? AOM?) issue, and not an SDK one, we just set up inline options via <setting> elements, no code from the SDK is run when a pref is set.
Component: General → Add-ons Manager
Product: Add-on SDK → Toolkit
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.