Closed Bug 1565888 Opened 1 year ago Closed 1 year ago

Setting text encoding to "Japanese" in TB's source view gives: JavaScript error: chrome://messenger/content/viewSource.js, line 438: NS_ERROR_I LLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALU E) [nsIDocShell.charset]


(MailNews Core :: Internationalization, defect)

Not set


(thunderbird69 fixed, thunderbird70 fixed)

Thunderbird 70.0
Tracking Status
thunderbird69 --- fixed
thunderbird70 --- fixed


(Reporter: jorgk-bmo, Assigned: jorgk-bmo)




(Keywords: regression)


(1 file, 1 obsolete file)

It fails here
since "Japanese" is not a valid encoding.

Before I dig though the M-C code to see how they might have fixed similar cases, I'll ask Henri.

Flags: needinfo?(hsivonen)

Oh, looks like Henri is away for a while.

Flags: needinfo?(VYV03354)

Well, OK, so will that detect ISO-2022-JP and EUC-JP?

Attached patch 1565888-onSetCharacterSet.patch (obsolete) — Splinter Review

OK, this at least fixes the JS error. Masatoshi-san, please let me know whether the comment is correct and this triggers auto-detection.

Assignee: nobody → jorgk
Flags: needinfo?(hsivonen)
Attachment #9077992 - Flags: review?(VYV03354)

Hmm, I tried with a message in ISO-2022-JP and the source view changed from
to テストテストテストテストテストテストテストテストテストテストテストテスト so that appears to be working.

However, setting a message being composed to encoding "Japanese" seems to give

[4232, Main Thread] WARNING: 'NS_FAILED(rv)', file c:/mozilla-source/comm-central/editor/libeditor/TextEditor.cpp, line 215
*** Failed to get string japanese in bundle: chrome://communicator/content/
JavaScript error: chrome://global/content/elements/stringbundle.js, line 45: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]

TextEditor.cpp, line 215 is EditorBase::SetDocumentCharacterSet(). So it looks like more work is required here, I'll file a new bug. The resulting message is stored in UTF-8 :-(

Filed bug 1565894 for the compose problem.

Fixed typo, sorry about the noise.

Attachment #9077992 - Attachment is obsolete: true
Attachment #9077992 - Flags: review?(VYV03354)
Attachment #9078011 - Flags: review?(VYV03354)

Masatoshi-san, can you please review this or should I find a different reviewer?

Comment on attachment 9078011 [details] [diff] [review]

Henri can review this.
Attachment #9078011 - Flags: review?(VYV03354)
Comment on attachment 9078011 [details] [diff] [review]

Review of attachment 9078011 [details] [diff] [review]:

Looks alright to me. Same as
Attachment #9078011 - Flags: review+

Thanks, Magnus, I was just going to request it.

Target Milestone: --- → Thunderbird 70.0
Comment on attachment 9078011 [details] [diff] [review]

TB 69 only (not TB 68 beta).
Attachment #9078011 - Flags: approval-comm-beta+

Pushed by
Replace Japanese with Shift_JIS in onSetCharacterSet() for view source. r=mkmelin DONTBUILD

Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.