Closed
Bug 299111
Opened 19 years ago
Closed 19 years ago
CountValidUTF8Bytes doesn't take surrogates into account
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: smontagu, Assigned: smontagu)
Details
Attachments
(1 file, 1 obsolete file)
1.99 KB,
patch
|
darin.moz
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
This was fixed for CalculateUTF8Length in bug 172700. UTF8InputStream::CountValidUTF8Bytes needs the same fix.
Assignee | ||
Comment 1•19 years ago
|
||
This patch shows the semantic change, but I think while I'm here I'll change some of the data names. "ucs2bytes" is doubly misnamed.
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #187636 -
Attachment is obsolete: true
Attachment #187639 -
Flags: superreview?(dbaron)
Attachment #187639 -
Flags: review?(darin)
Comment on attachment 187639 [details] [diff] [review] Patch with name changes sr=dbaron, although I dislike some of the new names: in particular, this is counting 2-byte units, not UTF-16 characters, some of which are 2 bytes and some of which are 4 bytes.
Attachment #187639 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 4•19 years ago
|
||
I'm not wild about "UTF16chars" either. If I think of something better I'll change it before checking in.
Updated•19 years ago
|
Attachment #187639 -
Flags: review?(darin) → review+
Assignee | ||
Updated•19 years ago
|
Target Milestone: --- → mozilla1.9alpha
Comment 5•19 years ago
|
||
How about |utf16Codeunits| or |utf16Units|? 'code unit' is used in the unicode standard. Our string document uses it, too.
Assignee | ||
Comment 6•19 years ago
|
||
Checked in with the name "UTF16CodeUnits"
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•