Convert unicode to code page 437 for JSON output, partially addresses #1428

This commit is contained in:
UnknownShadow200 2025-08-31 07:50:26 +10:00
parent d826461573
commit 8a8df0bfa4

View File

@ -99,8 +99,7 @@ static void Json_ConsumeString(struct JsonContext* ctx, cc_string* str) {
codepoint = (h[0] << 12) | (h[1] << 8) | (h[2] << 4) | h[3];
/* don't want control characters in names/software */
/* TODO: Convert to CP437.. */
if (codepoint >= 32) String_Append(str, codepoint);
if (codepoint >= 32) String_Append(str, Convert_CodepointToCP437(codepoint));
JsonContext_Consume(ctx, 4);
}