Closed Bug 734858 Opened 14 years ago Closed 14 years ago

Unicode in package.json preference field raises inappropriate value error

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: trash, Assigned: warner)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Build ID: 20120217110108 Steps to reproduce: Added a preference to the package.json containing a unicode character in the title field and run cfx on it: ... "preferences": [{ "name": "agerated", "title": "Altersbeschränkte Inhalte anzeigen", "type": "bool", "value": "true" }] ... Actual results: (addon-sdk)$ cfx run A given cfx option has an inappropriate value: 'ascii' codec can't encode character u'\xe4' in position 198: ordinal not in range(128) Expected results: cfx should have encoded the fields properly.
Assignee: nobody → warner-bugzilla
Priority: -- → P1
I've got a probable fix (with some tests) at https://github.com/mozilla/addon-sdk/pull/376
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #606684 - Flags: review?(poirot.alex)
Comment on attachment 606684 [details] pointer to pull-request 376 Looks good. Just an unused variable left over. cfx testcfx is green. And I gave a try with example given in comment 1 and it works perfectly. (Just have to ensure writting package.json in utf8)
Attachment #606684 - Flags: review?(poirot.alex) → review+
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/70a7fdc54060c2651f8dbe7c37e43cf326f97e5a Bug 734858: accept non-ASCII in package.json preferences field. r=@ochameau
done!
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: