Chromium Code Reviews
DescriptionFix vector resize logic when encoding non-BMP chars to x-user-defined
Since non-BMP characters take two UChars, when encoding to
x-user-defined with replacement characters ('?') may result the output
being shorter than the input. The encoding logic assumed the
replacement would always be larger, and vectors don't like being
shrunk. Correct the logic and make it more readable, add tests.
BUG=661823
Committed: https://crrev.com/38d521c4ccc88c44de1d189c82b895c4a39f90c4
Cr-Commit-Position: refs/heads/master@{#429964}
Patch Set 1 #Patch Set 2 : rebased #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 24 (15 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||