summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/utilities.cpp b/utilities.cpp
index 82a30bf..0ba8e12 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -975,20 +975,10 @@ int returnNoError(HANDLE hContact) {
string toUTF8(wstring str)
{
string ustr;
- wstring tmpstr;
- utf8::replace_invalid(str.begin(), str.end(), back_inserter(tmpstr));
- utf8::utf16to8(tmpstr.begin(), tmpstr.end(), back_inserter(ustr));
+ utf8::utf16to8(str.begin(), str.end(), back_inserter(ustr));
return ustr;
}
-string toUTF8(string str)
-{
- string ustr;
- wstring tmpstr;
- utf8::replace_invalid(str.begin(), str.end(), back_inserter(tmpstr));
- utf8::utf16to8(tmpstr.begin(), tmpstr.end(), back_inserter(ustr));
- return ustr;
-}
wstring toUTF16(string str) //convert as much as possible