diff options
Diffstat (limited to 'utilities.cpp')
-rwxr-xr-x | utilities.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/utilities.cpp b/utilities.cpp index 660a203..2b2126c 100755 --- a/utilities.cpp +++ b/utilities.cpp @@ -502,17 +502,7 @@ std::string toUTF8(std::wstring str) std::string toUTF8(std::string str) { - std::string ustr; - std::string tmpstr; - try{ - utf8::replace_invalid(str.begin(), str.end(), back_inserter(tmpstr)); - utf8::utf16to8(tmpstr.begin(), tmpstr.end(), back_inserter(ustr)); - } - catch(const std::exception &e) - { - //TODO: handle utf8cpp exceptions - } - return ustr; + return toUTF8(toUTF16(str)); } |