mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Android: Use correct encoding when converting strings
The functions with "UTF" in the name use "modified UTF-8" rather than the standard UTF-8 which Dolphin uses, at least according to Oracle's documentation, so it is incorrect for us to use them. This change fixes the problem by converting between UTF-8 and UTF-16 manually instead of letting JNI do it for us.
This commit is contained in:
parent
38791eec18
commit
f5da6e07d7
3 changed files with 27 additions and 10 deletions
|
@ -173,6 +173,8 @@ std::string SHIFTJISToUTF8(std::string_view str);
|
|||
std::string UTF8ToSHIFTJIS(std::string_view str);
|
||||
std::string WStringToUTF8(std::wstring_view str);
|
||||
std::string UTF16BEToUTF8(const char16_t* str, size_t max_size); // Stops at \0
|
||||
std::string UTF16ToUTF8(std::u16string_view str);
|
||||
std::u16string UTF8ToUTF16(std::string_view str);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue