summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-03-22 01:22:10 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2011-03-22 01:22:10 +0200
commit31b78ae77e9dba2afbb2979c7b84631e03869398 (patch)
tree3c8a27ec67c8701038982af19984f17a83d72a9e /utilities.cpp
parented8a4f7a485a222ebdf30aa6fd2e7c2344ec27f0 (diff)
fixed toUTF8 fuction crash //thx iexploe
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