Revert: UTF-8-Encoding-Fixes für Claude CLI auf Windows

Setzt die folgenden Commits zurück, da sie das Problem nicht behoben haben:
- e75c437 fix(encoding): UTF-8 prozess-global + 16-KB-StreamReader für CLI-Output
- bfd550e fix: UTF-8-Encoding gehärtet (SSE-Reader + CLI-Workspace)
- 32aad7f fix: UTF-8-Encoding für Claude CLI auf Windows erzwingen

Trotz cmd.exe-Wrapper mit chcp 65001, explizitem UTF-8-StreamReader (16 KB Buffer,
ohne BOM-Detection), Console.OutputEncoding global auf UTF-8 und LANG/LC_ALL/
PYTHONIOENCODING-Env-Vars treten weiterhin Replacement-Chars (�) für Umlaute
und Em-Dashes auf Windows auf. Der Bug muss separat per Diagnose-Logging
nachgestellt werden.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MelekiandClaude Opus 4.7 committed 2026-04-26 16:27:16 +02:00
1 parent e75c4370fd
commit 01346a952e
4 files changed
+9 -141

No files matched your search

-15
View File
@@ -3,7 +3,6 @@ using System.IO;
using System.Net;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Text;
using Gott.Endpoints;
using Gott.Middleware;
using Gott.Services;
@@ -14,20 +13,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
// Auf Windows: Console-Codepage des Server-Prozesses auf UTF-8 erzwingen.
// Wirkt prozess-global (Win32 SetConsoleOutputCP/SetConsoleCP) und wird von
// direkt gestarteten Child-Prozessen geerbt – damit Tools/Sub-Prozesse, die
// die Console-Codepage abfragen, UTF-8 als Output-Encoding nutzen.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
try
{
Console.OutputEncoding = Encoding.UTF8;
Console.InputEncoding = Encoding.UTF8;
}
catch { /* In Service-Kontexten ohne Console kann das werfen – ignorieren. */ }
}
var builder = WebApplication.CreateBuilder(args);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))