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

Unified Diff: Source/wtf/text/TextCodecUTF8.cpp

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code changes to correct Test Expectation Created 5 years, 7 months 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
Index: Source/wtf/text/TextCodecUTF8.cpp
diff --git a/Source/wtf/text/TextCodecUTF8.cpp b/Source/wtf/text/TextCodecUTF8.cpp
index 32801bc62c4cded46f2c967140ea25beba6011e0..c721029f8fbdf3c6fd9b15f0bb7021984112d0e1 100644
--- a/Source/wtf/text/TextCodecUTF8.cpp
+++ b/Source/wtf/text/TextCodecUTF8.cpp
@@ -167,7 +167,7 @@ void TextCodecUTF8::handleError(UChar*& destination, bool stopOnError, bool& saw
if (stopOnError)
return;
// Each error generates a replacement character and consumes one byte.
- *destination++ = replacementCharacter;
+ *destination++ = characterReplacement;
consumePartialSequenceByte();
}
@@ -195,7 +195,7 @@ bool TextCodecUTF8::handlePartialSequence<LChar>(LChar*& destination, const uint
return false;
}
// An incomplete partial sequence at the end is an error, but it will create
- // a 16 bit string due to the replacementCharacter. Let the 16 bit path handle
+ // a 16 bit string due to the characterReplacement. Let the 16 bit path handle
// the error.
return true;
}
@@ -411,7 +411,7 @@ upConvertTo16Bit:
if (stopOnError)
break;
// Each error generates a replacement character and consumes one byte.
- *destination16++ = replacementCharacter;
+ *destination16++ = characterReplacement;
++source;
continue;
}
@@ -443,7 +443,7 @@ CString TextCodecUTF8::encodeCommon(const CharType* characters, size_t length)
// U16_NEXT will simply emit a surrogate code point if an unmatched surrogate
// is encountered; we must convert it to a U+FFFD (REPLACEMENT CHARACTER) here.
if (0xD800 <= character && character <= 0xDFFF)
- character = replacementCharacter;
+ character = characterReplacement;
U8_APPEND_UNSAFE(bytes.data(), bytesWritten, character);
}

Powered by Google App Engine
This is Rietveld 408576698