Remove unneeded check in StringUtil::UTF16ToUTF8
No code is relying on this unexplained null byte check, since the only code that calls UTF16ToUTF8 on non-Windows systems is UTF16BEToUTF8, which explicitly strips null bytes.
This commit is contained in:
parent
1e24a5f309
commit
65c1df094f
|
@ -569,11 +569,7 @@ std::string UTF8ToSHIFTJIS(const std::string& input)
|
||||||
|
|
||||||
std::string UTF16ToUTF8(const std::wstring& input)
|
std::string UTF16ToUTF8(const std::wstring& input)
|
||||||
{
|
{
|
||||||
std::string result = CodeToUTF8("UTF-16LE", input);
|
return CodeToUTF8("UTF-16LE", input);
|
||||||
|
|
||||||
// TODO: why is this needed?
|
|
||||||
result.erase(std::remove(result.begin(), result.end(), 0x00), result.end());
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue