diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-03-05 01:42:11 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-03-05 01:42:11 +0200 |
commit | ca0c393161bf5ee7578f1a88a7f3ec8e44118f4b (patch) | |
tree | 71803f8f1e5971682f084ad7c14559a0a80c534f /utilities.cpp | |
parent | 2cc3972afe16ed661615490de5cad37d870ab375 (diff) |
additional checks in math expressions
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)); } |