From d476fc655dd23ec92da79714d6cdc672dfb1fa3e Mon Sep 17 00:00:00 2001 From: tangzhiqiang Date: Tue, 15 Sep 2026 22:26:06 +0800 Subject: [PATCH] fix(samples): pin console log charset to UTF-8 The rolling file appender already pins its layout charset to UTF-8, but the console appender falls back to the JVM default, which on Windows is the legacy code page (GBK on Chinese systems). Non-ASCII log text - task prompts, A2A-T protocol content, agent responses - then renders as mojibake in console output and in any log collector that captures stdout. Set the console layout charset explicitly to match the file appender. Signed-off-by: tangzhiqiang --- samples/src/main/resources/log4j2.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/src/main/resources/log4j2.properties b/samples/src/main/resources/log4j2.properties index 122b3138..cff0f38c 100644 --- a/samples/src/main/resources/log4j2.properties +++ b/samples/src/main/resources/log4j2.properties @@ -8,6 +8,7 @@ appender.console.name=Console appender.console.target=SYSTEM_OUT appender.console.layout.type=PatternLayout appender.console.layout.pattern=${LOG_PATTERN} +appender.console.layout.charset=UTF-8 # Rolling file appender appender.file.type=RollingFile appender.file.name=File