From ca0c393161bf5ee7578f1a88a7f3ec8e44118f4b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 5 Mar 2012 01:42:11 +0200 Subject: additional checks in math expressions --- utilities.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'utilities.cpp') 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)); } -- cgit v1.2.3