Index: Source/wtf/text/WTFString.h |
diff --git a/Source/wtf/text/WTFString.h b/Source/wtf/text/WTFString.h |
index 9b4d6119adf0de8a2bbbe286c00c222ae4f56094..7c2dffd226923a46e0e06d3c9b3aae7562624495 100644 |
--- a/Source/wtf/text/WTFString.h |
+++ b/Source/wtf/text/WTFString.h |
@@ -79,6 +79,12 @@ enum TrailingZerosTruncatingPolicy { |
TruncateTrailingZeros |
}; |
+enum UTF8ConversionMode { |
+ LenientUTF8Conversion, |
+ StrictUTF8Conversion, |
+ StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD |
+}; |
+ |
template<bool isSpecialCharacter(UChar), typename CharacterType> |
bool isAllSpecialCharacters(const CharacterType*, size_t); |
@@ -183,14 +189,7 @@ public: |
CString ascii() const; |
CString latin1() const; |
- |
- typedef enum { |
- LenientConversion, |
- StrictConversion, |
- StrictConversionReplacingUnpairedSurrogatesWithFFFD, |
- } ConversionMode; |
- |
- CString utf8(ConversionMode = LenientConversion) const; |
+ CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const; |
UChar operator[](unsigned index) const |
{ |
@@ -680,6 +679,8 @@ WTF_EXPORT const String& emptyString(); |
using WTF::CString; |
using WTF::KeepTrailingZeros; |
+using WTF::StrictUTF8Conversion; |
+using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; |
using WTF::String; |
using WTF::emptyString; |
using WTF::append; |