Closed
Bug 766604
Opened 13 years ago
Closed 13 years ago
Installing an app with UTF-8 characters does not show correct characters to the user on the shortcut, shortcut message, and app in about:apps
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)
Tracking
(firefox16 verified, firefox17 verified)
VERIFIED
FIXED
Firefox 17
People
(Reporter: jsmith, Assigned: wesj)
Details
Attachments
(3 files, 2 obsolete files)
779.27 KB,
image/png
|
Details | |
108.79 KB,
image/png
|
Details | |
2.01 KB,
patch
|
mbrubeck
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Steps:
1. Go to http://ed.agadak.net/app/
2. Install Ed's app that should contain Japanese characters in the name
Expected:
The Japanese characters should be shown correctly on the shortcut message, the shortcut itself, and the app in about:apps.
Actual:
See screenshots. Garbled incorrect characters are shown instead of the correct Japanese characters.
Reporter | ||
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Reporter | ||
Updated•13 years ago
|
QA Contact: aaron.train
Reporter | ||
Updated•13 years ago
|
Priority: -- → P1
Assignee | ||
Comment 3•13 years ago
|
||
I think we're mangling these when we save them to disk. Need to dig more.
Assignee | ||
Comment 4•13 years ago
|
||
This converts the title to UTF-8 before sending it to Java. That works, but I'm not exactly sure why. Hoping maybe you know mbrubeck? The downloaded manifest can be in any encoding. That's used to show the install prompt, which works just fine.
We save it as UTF-8:
http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#248
Then, we read that back from the disk.
http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#166
AFAICT, the string should be UTF-8 at that point, but I'm not sure how to query it exactly (the nsIChannel reports nothing).
http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/NetUtil.jsm#116
When we finally send this to Java, it expects UTF-16 which may be our problem? Except this patch just converts to UTF-8....
Attachment #645468 -
Flags: feedback?(mbrubeck)
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 645468 [details] [diff] [review]
WIP Patch
Wrong patch....
Attachment #645468 -
Flags: feedback?(mbrubeck)
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #645468 -
Attachment is obsolete: true
Attachment #645469 -
Flags: feedback?(mbrubeck)
Comment 7•13 years ago
|
||
Comment on attachment 645469 [details] [diff] [review]
WIP Patch
Review of attachment 645469 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/chrome/content/browser.js
@@ +5962,5 @@
>
> + // The manifest is stored as UTF-8. This is a responseText value from reading the manifest file, which
> + // should be UTF-8. sendMessageToJava expects UTF-16 strings, so I'm not sure why UTF-8 fixes this
> + let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter);
> + converter.charset = "UTF-8";
If I understand correctly, this is converting *from* UTF-8 to UTF-16. Our internal Unicode strings are always UTF-16, so ConvertToUnicode always converts *to* UTF-16, and ConvertFromUnicode always converts *from* UTF-16. So this code looks exactly correct, except for the comment.
Attachment #645469 -
Flags: feedback?(mbrubeck) → feedback+
Updated•13 years ago
|
Status: NEW → ASSIGNED
tracking-fennec: --- → ?
status-firefox16:
--- → affected
status-firefox17:
--- → affected
Assignee | ||
Comment 8•13 years ago
|
||
Whoops. Forgot about this. Here's the same patch then, with the comment fixed.
Assignee: nobody → wjohnston
Attachment #645469 -
Attachment is obsolete: true
Attachment #647320 -
Flags: review?(mbrubeck)
Updated•13 years ago
|
Attachment #647320 -
Flags: review?(mbrubeck) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Reporter | ||
Updated•13 years ago
|
Whiteboard: [qa+]
Assignee | ||
Comment 10•13 years ago
|
||
Comment on attachment 647320 [details] [diff] [review]
Patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Always present
User impact if declined: Apps using UTF-8 characters will have them scrambled
Testing completed (on m-c, etc.): landed on mc today
Risk to taking this patch (and alternatives if risky: Low risk. Mobile only. Should only help.
String or UUID changes made by this patch: None.
Attachment #647320 -
Flags: approval-mozilla-aurora?
Updated•13 years ago
|
Attachment #647320 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 11•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Updated•13 years ago
|
status-firefox17:
affected → ---
Updated•13 years ago
|
Comment 12•13 years ago
|
||
Keywords: checkin-needed
Updated•13 years ago
|
Whiteboard: [qa+]
Updated•11 years ago
|
tracking-fennec: ? → ---
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•