Closed
Bug 1089298
Opened 10 years ago
Closed 10 years ago
Stop mime decoding to UTF-8 only to convert to UTF-16
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 38.0
People
(Reporter: jcranmer, Assigned: jcranmer)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
(deleted),
patch
|
rkent
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rkent
:
review+
|
Details | Diff | Splinter Review |
Let's kill this pattern:
nsAutoCString stringToMatch;
nsresult rv = mimeConverter->DecodeMimeHeaderToUTF8(
rfc2047string, charset, charsetOverride, false, stringToMatch);
nsAutoString utf16String;
CopyUTF8toUTF16(stringToMatch, utf16String);
Comment 1•10 years ago
|
||
After bug 998392, a lot of the strings inside JS are stored in latin1 instead of UTF16, does that play into this at all?
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #1)
> After bug 998392, a lot of the strings inside JS are stored in latin1
> instead of UTF16, does that play into this at all?
AUTF8String is still a nasty conversion, because it's neither UTF-16 nor Latin1.
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8559275 -
Flags: review?(kent)
Comment 5•10 years ago
|
||
Comment on attachment 8559275 [details] [diff] [review]
Part 2: Save the needle as a UTF-16 string
Review of attachment 8559275 [details] [diff] [review]:
-----------------------------------------------------------------
1) I believe that you also need to initialize mValue.utf16String in nsMsgSearchValueImpl::nsMsgSearchValueImpl(nsMsgSearchValue *aInitialValue)
2) Can't you use utf16String in nsMsgSearchValueImpl::GetStr(nsAString &aResult) to eliminate that conversion?
Attachment #8559275 -
Flags: review?(rkent) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8559274 [details] [diff] [review]
Part 1: Pass UTF-16 strings around search instead of UTF-8
Review of attachment 8559274 [details] [diff] [review]:
-----------------------------------------------------------------
I have my doubts as to whether this is worth the effort, but let's try it.
Attachment #8559274 -
Flags: review?(rkent) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/comm-central/rev/1028fda75e9d
https://hg.mozilla.org/comm-central/rev/4255fc99c7cf
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 38.0
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•