diff --git a/TIASshot/Utils/ImageStats.cs b/TIASshot/Utils/ImageStats.cs index 52b8bae..f98d4b7 100644 --- a/TIASshot/Utils/ImageStats.cs +++ b/TIASshot/Utils/ImageStats.cs @@ -194,6 +194,12 @@ foreach (var c in s) { if (c == '"') sb.Append("\\\""); else if (c == '\\') sb.Append("\\\\"); + else if (c == '\n') sb.Append("\\n"); + else if (c == '\r') sb.Append("\\r"); + else if (c == '\t') sb.Append("\\t"); + else if (c == '\b') sb.Append("\\b"); + else if (c == '\f') sb.Append("\\f"); + else if (c < 0x20) sb.Append("\\u").Append(((int)c).ToString("x4")); // RFC 8259 §7: 制御文字は必ずエスケープ else sb.Append(c); } sb.Append('"');