Closed Bug 1726018 Opened 3 years ago Closed 3 years ago

Garbled characters occur when the description of the SMTP server is in Japanese.

Categories

(Thunderbird :: Account Manager, defect)

Thunderbird 91
Desktop
All
defect

Tracking

(thunderbird_esr78 unaffected, thunderbird_esr91+ fixed, thunderbird88 wontfix, thunderbird89 wontfix, thunderbird90 wontfix, thunderbird91 wontfix, thunderbird92+ fixed)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird_esr91 + fixed
thunderbird88 --- wontfix
thunderbird89 --- wontfix
thunderbird90 --- wontfix
thunderbird91 --- wontfix
thunderbird92 + fixed

People

(Reporter: alice0775, Assigned: rnons)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

Attached image screenshot (deleted) —

Steps To Reproduce:

  1. Tool > Account Settings
  2. Outgoing Server(SMTP) Settings > Add
  3. Input アイウ in Description field
  4. Input smtp.gmail.com in Server Name field
  5. OK
    --- observe BUG, Descriptions are garbled.

Actual Results:
Descriptions are garbled.
See attached screenshot.

Expected Results:
Descriptions should not be garbled.

Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=a13da366d8460497a948184ef669cf99f560c4d0&tochange=d717ba817b41715f11400fd4e5d24cb709508ebb
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1add9a1bbfacd4ff1bee961fa8886b8cd0566d23&tochange=97a677952b4b25afd4548562dd06e604c50b373e

Version: unspecified → Thunderbird 91
Blocks: smtp-js
Flags: needinfo?(alessandro)

Not sure about this as I haven't worked on this section.
Maybe Ping knows something as he worked on implementing the nsISmtpService in JS.

Flags: needinfo?(alessandro) → needinfo?(remotenonsense)

The description string is stored in the pref: mail.smtpserver.smtp<ID>.description
With mailnews.smtp.jsmodule = FALSE the encoding is UTF-8.
With mailnews.smtp.jsmodule = TRUE the encoding is Windows-1252.

getCharPref/setCharPref operates with ACString, but description/hostname in nsISmtpServer are AUTF8String. Unlike C++ XPCOM, XPConnect doesn't help us convert automatically in this case. This patch introduces StringUtils.jsm to reuse the convertion code.

Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED
Flags: needinfo?(remotenonsense)
Target Milestone: --- → 93 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ba1d334eca8f
Fix getter/setter of description/hostname in SmtpServer.jsm. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9236557 [details]
Bug 1726018 - Fix getter/setter of description/hostname in SmtpServer.jsm. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): bug 1661694
User impact if declined: Non-ascii description for smtp server doesn't work
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9236557 - Flags: approval-comm-esr91?
Attachment #9236557 - Flags: approval-comm-beta?

Comment on attachment 9236557 [details]
Bug 1726018 - Fix getter/setter of description/hostname in SmtpServer.jsm. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9236557 - Flags: approval-comm-beta? → approval-comm-beta+

We're building 91.0.2 today, but this hasn't yet been on beta. So this will be eligible for 91.0.3 which will probably happen next week.

Comment on attachment 9236557 [details]
Bug 1726018 - Fix getter/setter of description/hostname in SmtpServer.jsm. r=mkmelin

[Triage Comment]
Approved for esr91

Attachment #9236557 - Flags: approval-comm-esr91? → approval-comm-esr91+
Blocks: tb91found
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: