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>
Root cause: PowerShell command was wrapped in exec() with double-quote
escaping that silently failed. Rewrote using execFile() with args array
which requires no manual escaping.
Changes:
- electron/devices.js: use execFile('powershell.exe', [...args]) for
window enumeration — eliminates quoting issues entirely
- Window list now returned INSIDE getDevices() video array (type='window')
so they arrive together with cameras/screens in one IPC call
- StreamSettings: windows grouped from devices.video directly, with 🪟
emoji prefix for visual distinction
- Added inline "↻ Обновить" button in video source field header to
refresh devices+windows on demand without switching tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>