Index: Source/wtf/text/TextCodecICU.cpp |
diff --git a/Source/wtf/text/TextCodecICU.cpp b/Source/wtf/text/TextCodecICU.cpp |
index 7458c2acf09a34405c51ed3086124e9717d0f976..7a9014b4ba60f2181d3532d086fcfe165dce36d1 100644 |
--- a/Source/wtf/text/TextCodecICU.cpp |
+++ b/Source/wtf/text/TextCodecICU.cpp |
@@ -424,36 +424,21 @@ public: |
TextCodecInput(const TextEncoding& encoding, const UChar* characters, size_t length) |
: m_begin(characters) |
, m_end(characters + length) |
- { |
- if (encoding.hasTrivialDisplayString()) |
- return; |
- m_buffer.reserveInitialCapacity(length); |
- m_buffer.append(characters, length); |
- initalizeFromBuffer(encoding); |
- } |
+ { } |
TextCodecInput(const TextEncoding& encoding, const LChar* characters, size_t length) |
{ |
m_buffer.reserveInitialCapacity(length); |
for (size_t i = 0; i < length; ++i) |
m_buffer.append(characters[i]); |
- initalizeFromBuffer(encoding); |
+ m_begin = m_buffer.data(); |
+ m_end = m_begin + m_buffer.size(); |
} |
const UChar* begin() const { return m_begin; } |
const UChar* end() const { return m_end; } |
private: |
- void initalizeFromBuffer(const TextEncoding& encoding) |
- { |
- // FIXME: We should see if there is "force ASCII range" mode in ICU; |
- // until then, we change the backslash into a yen sign. |
- // Encoding will change the yen sign back into a backslash. |
- encoding.displayBuffer(m_buffer.data(), m_buffer.size()); |
- m_begin = m_buffer.data(); |
- m_end = m_begin + m_buffer.size(); |
- } |
- |
const UChar* m_begin; |
const UChar* m_end; |
Vector<UChar> m_buffer; |