1
0
Fork 0

DBG+GUI: resolved issue #609 (fixed assert for UTF-8 characters) + updated translation

This commit is contained in:
mrexodia 2016-06-05 03:16:02 +02:00
parent 60034795e5
commit 7830ec98e5
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
2 changed files with 509 additions and 403 deletions

View File

@ -1,6 +1,9 @@
#include <sstream>
#include "stringutils.h"
#include "memory.h"
#include "dynamicmem.h"
#include <windows.h>
#include <cstdint>
StringList StringUtils::Split(const String & s, char delim, std::vector<String> & elems)
{
@ -27,7 +30,7 @@ String StringUtils::Escape(const String & s)
String escaped = "";
for(size_t i = 0; i < s.length(); i++)
{
char ch = s[i];
auto ch = uint8_t(s[i]);
switch(ch)
{
case '\t':
@ -55,7 +58,7 @@ String StringUtils::Escape(const String & s)
if(!isprint(ch)) //unknown unprintable character
{
char buf[16] = "";
sprintf_s(buf, "\\x%.2X", (unsigned char)ch);
sprintf_s(buf, "\\x%02X", ch);
escaped += buf;
}
else

File diff suppressed because it is too large Load Diff