Use explicit UTF-8 charset in StdioServerTransportProvider (#826)

Also add a test simulating a different locale in an isolated process.

Resolves #295
This commit is contained in:
조형준 2026-03-03 00:57:08 +09:00 • committed by GitHub
commit 05f37ad027
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -214,7 +214,7 @@ public class StdioServerTransportProvider implements McpServerTransportProvider
inboundReady.tryEmitValue(null);
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(inputStream));
reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
while (!isClosing.get()) {
try {
String line = reader.readLine();