Fix encoding

This commit is contained in:
Vítor Santos Costa
2016-02-18 12:10:58 +00:00
parent 05a978ce82
commit 484168b1ce
18 changed files with 1557 additions and 1522 deletions

View File

@@ -572,7 +572,7 @@ static void write_string(const unsigned char *s,
qt = '"';
wrputc(qt, stream);
do {
ptr += get_utf8(ptr, &chr);
ptr += get_utf8(ptr, -1, &chr);
if (chr == '\0')
break;
write_quoted(chr, qt, stream);