okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
3616148bb
main
1/** 2* Windows PowerShell writes to a pipe in the console's OEM code page (cp866 on a Russian Windows, cp437 on an English one), 3* not in UTF-8, while Node reads the pipe as UTF-8 - so a Cyrillic folder name came back as mojibake or as question marks (#3202). 4* Every script whose output can hold a folder, file or font name starts with this line, before anything is written. 5*/ 6export const POWERSHELL_UTF8 = '[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding $false; $OutputEncoding = [Console]::OutputEncoding; ' ; 7 8/** The script with the UTF-8 line in front of it. */ 9export const utf8Script = script => POWERSHELL_UTF8 + script ;