diff options
Diffstat (limited to 'src/UniConversion.h')
-rw-r--r-- | src/UniConversion.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/UniConversion.h b/src/UniConversion.h index 4bb8875d0..9f405e1ed 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -19,7 +19,11 @@ void UTF8FromUTF16(const wchar_t *uptr, size_t tlen, char *putf, size_t len); void UTF8FromUTF32Character(int uch, char *putf); size_t UTF16Length(const char *s, size_t len); size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen); +size_t UTF32Length(const char *s, size_t len) noexcept; size_t UTF32FromUTF8(const char *s, size_t len, unsigned int *tbuf, size_t tlen); +// WStringFromUTF8 does the right thing when wchar_t is 2 or 4 bytes so +// works on both Windows and Unix. +std::wstring WStringFromUTF8(const char *s, size_t len); unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) noexcept; bool UTF8IsValid(const char *s, size_t len) noexcept; std::string FixInvalidUTF8(const std::string &text); |