Closed
Bug 608585
Opened 14 years ago
Closed 14 years ago
BzAPI utf8_encodes json twice
Categories
(Webtools Graveyard :: BzAPI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Swatinem, Assigned: gerv)
References
Details
When a bug summary includes some utf8 characters (like https://landfill.bugzilla.org/bzapi_sandbox/show_bug.cgi?id=9945 does), the resulting json does not include the characters like it should, it rather utf8_encodes them twice.
Run the following script in a jQuery enabled firebug console (on tbpl.mozilla.org for example): $.getJSON("https://api-dev.bugzilla.mozilla.org/test/latest/bug?whiteboard=orange&summary=test_service_wipeServer.js", function(json) { console.log(json); });
The resulting json will not include the bug summary as utf8 like it should, it rather includes each of the utf8 bytes separately.
Opening the url ( https://api-dev.bugzilla.mozilla.org/test/latest/bug?whiteboard=orange&summary=test_service_wipeServer.js ) in the browser (Accept: sniffing) reveals that the html is also encoding the chars as byte sequences \x.. instead of utf8 characters.
Updated•14 years ago
|
Assignee: webservice → gerv
Component: WebService → BzAPI
Product: Bugzilla → Webtools
QA Contact: default-qa → bzapi
Version: unspecified → other
Assignee | ||
Comment 1•14 years ago
|
||
Thank you for your helpful report :-)
This problem only occurred on bug lists, and was because we weren't correctly reading the CSV Bugzilla returns as UTF8. It's a one line fix, which is now in the repo and will be in the next release.
Gerv
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•