Closed
Bug 948399
Opened 11 years ago
Closed 11 years ago
[Messages] Subject. A subject containing special characters sent in a message is not received correctly
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(blocking-b2g:1.3+, firefox27 wontfix, firefox28 fixed, firefox29 fixed, b2g-v1.3 fixed, b2g-v1.4 fixed)
People
(Reporter: isabelrios, Assigned: airpingu)
References
Details
(Whiteboard: [FT:RIL])
Attachments
(3 files, 3 obsolete files)
14.04 KB,
image/png
|
Details | |
4.30 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
1.87 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
Checked with today's v1.3 build:
Gecko-72c03fb
Gaia-cbd2921
STR
1. Open messaging app
2. Create a new message
3. Tap on '...' icon
4. Select 'Add subject'
5. Type something with special charas, for example: Ñü
6. Write something and attach a file
7. Send the message
EXPECTED
The message showing the subject is received correctly
ACTUAL
This subject: 'Ñü' is recived as '??'.
Checked sending the message with subject to another Firefox OS and to an Android device
Comment 1•11 years ago
|
||
Hey Gene, could you please comment about this?
Are extended characters supported in MMS subjects?
How should we handle this?
Flags: needinfo?(gene.lian)
Assignee | ||
Comment 2•11 years ago
|
||
Sounds something wrong in the encoding on the Gecko side. Taking a look.
Assignee: nobody → gene.lian
Blocks: b2g-mms
Flags: needinfo?(gene.lian)
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Updated•11 years ago
|
Component: Gaia::SMS → RIL
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8350575 -
Flags: review?(vyang)
Comment 5•11 years ago
|
||
Comment on attachment 8350575 [details] [diff] [review]
Patch
Review of attachment 8350575 [details] [diff] [review]:
-----------------------------------------------------------------
Please also add a test case for this. Thank you :)
Attachment #8350575 -
Flags: review?(vyang) → review+
Assignee | ||
Updated•11 years ago
|
status-b2g-v1.3:
--- → affected
status-firefox27:
--- → wontfix
status-firefox28:
--- → affected
status-firefox29:
--- → affected
Assignee | ||
Comment 6•11 years ago
|
||
As discussion with Vicamo yesterday, I encountered a dilemma that whether or not to rewrite the test test_Address_decode in test_mms_pdu_helper.js.
Assignee | ||
Comment 7•11 years ago
|
||
Did you come out up with any better idea? If not, I'll go ahead to make the specific logic for subject so that we don't need to rewrite all the test cases for test_Address_decode.
Flags: needinfo?(vyang)
Comment 8•11 years ago
|
||
I don't know the issue, but this feels wrong to specifically modify the code so that the tests are passing... does it mean the tests are not testing real world use cases? :)
Comment 9•11 years ago
|
||
(In reply to Gene Lian [:gene] (PTO Dec. 25 ~ Jan. 5) from comment #7)
> Did you come out up with any better idea? If not, I'll go ahead to make the
> specific logic for subject so that we don't need to rewrite all the test
> cases for test_Address_decode.
From OMA-TS-MMS_ENC-V1_3-20110913-A, it has:
Encoded-string-value = Text-string | Value-length Char-set Text-string
From OMA-TS-MMS-CONF-V1_3-20110913-A, it has:
Some of the MMS headers have been defined as "Encoded-string-value".
The character set IANA MIBEnum value in these headers SHALL be
encoded as Integer-value ([WAPWSP] section 8.4.2.3). The character
set us-ascii (IANA MIBenum 3) SHALL always be accepted. If the
character set is not specified (simple Text-string encoding) the
character set SHALL be identified as us-ascii (lower half of ISO
8859-1 [ISO8859-1]). When the text string cannot be represented as
us-ascii, the character set SHALL be encoded as utf-8 (IANA MIBenum
106) which has unique byte ordering.
So it's fine to have a more strict range for when should we encode an "Encoded-string-value" as a "Text-string".
(In reply to Julien Wajsberg [:julienw] from comment #8)
> I don't know the issue, but this feels wrong to specifically modify the code
> so that the tests are passing... does it mean the tests are not testing real
> world use cases? :)
The problem is we followed MMS-ENC to encode an Encoded-string-value as either a plain Text-string or a charset-based Text-string. The case we have here, "Ñü", is actually acceptable for a plain Text-string encoder, so we did not encode it as a charset-based one.
However, it seems MMS proxy servers are expecting the other form. So one trivial solution is to encode an Encoded-string-value as a charset-based Text-string. But all the xpcshell test cases we had now follow the same "plain Text-string first and fallback to charset-based Text-string" rule. The solution follows a ton of changes to existing xpcshell test cases.
Now we know the best, and standard conforming solutions should be "plain Text-string if it's in us-ascii range, or fallback to charset-based Text-string". This way, there should be only a few xpcshell test cases are affected.
Flags: needinfo?(vyang)
Comment 10•11 years ago
|
||
Thanks for the explanation Vicamo! Yet another case where being spec compliant is not enough ;)
Comment 11•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #10)
> Thanks for the explanation Vicamo! Yet another case where being spec
> compliant is not enough ;)
Well, I don't think my previous comment meant that. I would say that we have conformed MMS-ENC but miss MMS-CONF.
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8350575 -
Attachment is obsolete: true
Attachment #8360929 -
Flags: review?(vyang)
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #8360954 -
Flags: review?(vyang)
Assignee | ||
Comment 14•11 years ago
|
||
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 8360954 [details] [diff] [review]
Patch, test case, V1
Cancel the review. Test went wrong.
Attachment #8360954 -
Flags: review?(vyang)
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #8360954 -
Attachment is obsolete: true
Attachment #8361647 -
Flags: review?(vyang)
Updated•11 years ago
|
Whiteboard: [FT:RIL]
Updated•11 years ago
|
Attachment #8360929 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 17•11 years ago
|
||
Comment on attachment 8361647 [details] [diff] [review]
Patch, test case, V2
Review of attachment 8361647 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/tests/test_mms_pdu_helper.js
@@ +425,5 @@
> let raw = conv.convertToByteArray(str).concat([0]);
> wsp_encode_test(MMS.EncodedStringValue, str,
> [raw.length + 2, 0x80 | entry.number, 127].concat(raw));
> +
> + // "Ñü"
Self review. Will add some comments here:
// MMS.EncodedStringValue encodes non us-ascii characters (128 ~ 255)
// (e.g., 'Ñ' or 'ü') by the utf-8 encoding. Otherwise, for us-ascii
// characters (0 ~ 127), still use the normal TextString encoding.
Comment 18•11 years ago
|
||
Comment on attachment 8361647 [details] [diff] [review]
Patch, test case, V2
Review of attachment 8361647 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/tests/test_mms_pdu_helper.js
@@ +416,4 @@
> // Test for utf-8
> let (entry = MMS.WSP.WSP_WELL_KNOWN_CHARSETS["utf-8"]) {
> + // "MOZILLA" in full width.
> + let str = "\uff4d\uff4f\uff5a\uff49\uff4c\uff4c\uff41";
nit: that's correct, don't have to modify it.
@@ +426,5 @@
> wsp_encode_test(MMS.EncodedStringValue, str,
> [raw.length + 2, 0x80 | entry.number, 127].concat(raw));
> +
> + // "Ñü"
> + str = "Ñü";
nit: Please use `str("\u00d1\u00fc")`. Don't etch unicode string directly in effective lines. "Ñü" in comments is fine.
@@ +429,5 @@
> + // "Ñü"
> + str = "Ñü";
> +
> + raw = conv.convertToByteArray(str).concat([0]);
> + wsp_encode_test(MMS.EncodedStringValue, "Ñü",
nit: s/Ñü/str/
Attachment #8361647 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 19•11 years ago
|
||
Attachment #8361647 -
Attachment is obsolete: true
Attachment #8362375 -
Flags: review+
Assignee | ||
Comment 20•11 years ago
|
||
And full try: https://tbpl.mozilla.org/?tree=Try&rev=3e4cbfec5e8c
Assignee | ||
Comment 21•11 years ago
|
||
Comment 22•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7eab4ab1be76
https://hg.mozilla.org/mozilla-central/rev/a1495858ac6f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 23•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/f9e38adda8ee
https://hg.mozilla.org/releases/mozilla-aurora/rev/72af78a81714
status-b2g-v1.4:
--- → fixed
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
Reporter | ||
Comment 24•11 years ago
|
||
Verified on today's(01/22) v1.3 buri build:
Gecko-6840e8c
Gaia-744fb69
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•