From ef20f59a98a6c02168964d0e189edc6cc5bb0e77 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 26 Feb 2013 18:31:09 -0300 Subject: [PATCH] Fix new line in utf8 conversion --- src/framework/stdext/string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/stdext/string.cpp b/src/framework/stdext/string.cpp index aca42c1e..452e2ad5 100644 --- a/src/framework/stdext/string.cpp +++ b/src/framework/stdext/string.cpp @@ -144,7 +144,7 @@ std::string utf8_to_latin1(const std::string& src) std::string out; for(uint i=0;i= 32 && c < 128) + if((c >= 32 && c < 128) || c == 0x0d || c == 0x0a || c == 0x09) out += c; else if(c == 0xc2 || c == 0xc3) { uchar c2 = src[i++]; @@ -167,7 +167,7 @@ std::string latin1_to_utf8(const std::string& src) { std::string out; for(uchar c : src) { - if(c >= 32 && c < 128) + if((c >= 32 && c < 128) || c == 0x0d || c == 0x0a || c == 0x09) out += c; else { out += 0xc2 + (c > 0xbf);