fix: print in hex format for non-ascii unicode
This commit is contained in:
parent
cdaae370de
commit
799994c0b3
|
@ -903,9 +903,19 @@ int argo_write_string(ARGO_STRING *s, FILE *f)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c <= 0xff)
|
||||
{
|
||||
fprintf(f, "%c", *c);
|
||||
}
|
||||
else if (c <= 0xfff)
|
||||
{
|
||||
fprintf(f, "\\u0%x", c);
|
||||
}
|
||||
else {
|
||||
fprintf(f, "\\u%x", c);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user