diff options
Diffstat (limited to 'core/fxcrt/bytestring.cpp')
-rw-r--r-- | core/fxcrt/bytestring.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/fxcrt/bytestring.cpp b/core/fxcrt/bytestring.cpp index b6c1ce7bbd..3ff0e3537a 100644 --- a/core/fxcrt/bytestring.cpp +++ b/core/fxcrt/bytestring.cpp @@ -669,11 +669,7 @@ size_t ByteString::Replace(const ByteStringView& pOld, } WideString ByteString::UTF8Decode() const { - CFX_UTF8Decoder decoder; - for (size_t i = 0; i < GetLength(); i++) { - decoder.Input(static_cast<uint8_t>(m_pData->m_String[i])); - } - return WideString(decoder.GetResult()); + return WideString::FromUTF8(AsStringView()); } int ByteString::Compare(const ByteStringView& str) const { |