Files
srt-streamer/electron
admin 6b0c2ca0ae fix: Cyrillic window titles garbled in device list
PowerShell on Russian Windows outputs text in CP1251/CP866 by default.
Node.js reads stdout as UTF-8 → Cyrillic becomes mojibake.

Fix: force UTF-8 output at the start of every PowerShell command:
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8;
  $OutputEncoding = [System.Text.Encoding]::UTF8;

Receive stdout as raw Buffer (encoding:'buffer'), strip UTF-8 BOM
if present, then decode explicitly with .toString('utf8').

Also fixed runCommand() to collect chunks into Buffer arrays and
decode as UTF-8 (FFmpeg always outputs UTF-8 regardless of locale).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 01:27:22 +03:00
..