console.log of non-ASCII text is mojibake on Windows consoles with a non-UTF-8 code page (no WriteConsoleW)
- Vorherrschende Sprache
- Rust
- Sterne
- 108k
- Forks
- 6.4k
- Ø Merge
- 2 T. 20 Std.
- Gemergte PRs (30 T.)
- 58
Beschreibung
Version: Deno 2.2.2

My repo uses ps12exe to help users install git, deno, and start the repo.
But it seems that deno's Chinese output in ps12exe is messed up.

# reproduce:
1. open powershell on Windows
2. Install ps12exe by:
```powershell
Install-Module ps12exe -Scope CurrentUser -Force
```
It'll download an 1mb powershell moule for generate exe, you can remove it by `Uninstall-Module ps12exe`
3. Run the following command:
```powershell
deno eval "console.log('测试')" # outputs: 测试
"deno eval `"console.log('测试')`"" | ps12exe
./a.exe # outputs: 娴嬭瘯
"'测试'" | ps12exe
./a.exe # outputs: 测试
```

You don't need to install powershell core, use windows powershell that comes with windows and make sure deno is in your path can also reproduce this.

Beitragsleitfaden
Rechercherichtung
Beginne damit, das Problem mit Deno 2.2.2 unter Verwendung der gezeigten PowerShell- und ps12exe-Befehle zu reproduzieren, insbesondere `deno eval "console.log('测试')"`. Verfolge den Pfad der `console.log`-Ausgabe unter Windows, wenn die Konsole WriteConsoleW nicht unterstützt und eine Nicht-UTF-8-Codepage verwendet. Als abgeschlossen gilt die Aufgabe, wenn der chinesische Text in der Ausgabe der generierten ausführbaren Datei korrekt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, rust
- Bereich
- cli, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100