Closed Bug 779885 Opened 12 years ago Closed 12 years ago

navigator.mozContacts.getSimContacts() drops non-ASCII chars

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: kaze, Assigned: allstars.chh)

References

Details

Attachments

(2 files, 6 obsolete files)

STR:

 • using a dumbphone (e.g. my Nokia 1616), store contacts with French accented chars on the SIM card;
 • take the SIM card out, use it in a Samsung GS2, all contacts are properly imported;
 • take the SIM card out, use it in an Otoro with the latest Gonk/Gecko/Gaia, all accented characters are dropped (e.g. «Cédric» becomes «Cdric»).
OS: Linux → All
Hardware: x86_64 → All
Blocks: 751052
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
I'll check SIM part first.
Assignee: nobody → allstars.chh
Hi Vicamo,
I add a function called readGsm8BitUnpackToString referenced from readSeptetsToString by your suggestion, would you take a look in it and give me some feedback?

Thanks
Attachment #649222 - Flags: feedback?(vyang)
Comment on attachment 649222 [details] [diff] [review]
Patch to show non-ASCII chars in SIM

Review of attachment 649222 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +4074,5 @@
>    /**
> +   * Read GSM 8-bit unpacked octets,
> +   * which are SMS default 7-bit alphabets with bit 8 set to 0.
> +   */
> +  readGsm8BitUnpackedToString: function readGsm8BitUnpackedToString(length) {

Can you rename it to read8BitSeptetsToString()? That way we have similar names for the two septet string reading variants.

@@ +4077,5 @@
> +   */
> +  readGsm8BitUnpackedToString: function readGsm8BitUnpackedToString(length) {
> +    let ret = "";
> +    let escapeFound = false;
> +    const langTable = PDU_NL_LOCKING_SHIFT_TABLES[0];

we had defined PDU_NL_IDENTIFIER_DEFAULT for default charset index.

@@ +4079,5 @@
> +    let ret = "";
> +    let escapeFound = false;
> +    const langTable = PDU_NL_LOCKING_SHIFT_TABLES[0];
> +    const langShiftTable = PDU_NL_SINGLE_SHIFT_TABLES[0];
> +  

tailing white space

@@ +4123,5 @@
>    readUCS2String: function readUCS2String(numOctets) {
>      let str = "";
> +    for (let i = 0; i < numOctets; i++) {
> +      let temp = this.readHexOctet();
> +      if (temp == 0xff) {

Hey! UCS2 has no such restriction! For example, character 'Ͽ' has code 0x03FF.
Attachment #649222 - Flags: feedback?(vyang) → feedback-
Status: NEW → ASSIGNED
- Address to Vicamo's review comments.
- Add a function 'readICCUCS2String' to read UCS2 String on ICC.
Attachment #649222 - Attachment is obsolete: true
Hi Vicamo
Could you review this patch for me?

Thanks
Attachment #649592 - Attachment is obsolete: true
Attachment #650435 - Flags: review?(vyang)
Attached patch xpcshell tests (obsolete) — Splinter Review
Hi, Vicamo
This is the xpcshell tests.

Thanks
Attachment #650436 - Flags: review?(vyang)
Comment on attachment 650435 [details] [diff] [review]
Patch to show non-ASCII chars in SIM. v4

Review of attachment 650435 [details] [diff] [review]:
-----------------------------------------------------------------

Sweet!
Attachment #650435 - Flags: review?(vyang) → review+
Attached patch Part 2: xpcshell tests v2 (obsolete) — Splinter Review
update tests
Attachment #650436 - Attachment is obsolete: true
Attachment #650436 - Flags: review?(vyang)
Attachment #650489 - Flags: review?(vyang)
Attachment #650489 - Flags: review?(vyang) → review+
rebase
Attachment #650489 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/461d2a2a5b88
https://hg.mozilla.org/mozilla-central/rev/8405e424a351
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 1157082
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: