Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2846)

Unified Diff: base/utf_offset_string_conversions.cc

Issue 522029: If we can't read a unicode character, write the standard "unknown" (0xFFFD) c... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/utf_offset_string_conversions.cc
===================================================================
--- base/utf_offset_string_conversions.cc (revision 35352)
+++ base/utf_offset_string_conversions.cc (working copy)
@@ -36,8 +36,7 @@
if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) {
chars_written = WriteUnicodeCharacter(code_point, output);
} else {
- // TODO(jungshik): consider adding 'Replacement character' (U+FFFD)
- // in place of an invalid codepoint.
+ chars_written = WriteUnicodeCharacter(0xFFFD, output);
success = false;
}
if ((output_offset != std::wstring::npos) &&
« no previous file with comments | « no previous file | base/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698