Closed Flat closed 3 months ago
The stdin/stdout of fzf is regonized/encoded as utf8, same as all unix tool like ripgrep, fdfind. But the default stdin/stdout encoding for windows tool and powershell scripts is unicode(utf16-LE). So piping get-childitem
to fzf
, it will result as incorrect unicode for CJK. You may need to set the encoding to utf8 by
$InputEncoding = $OutputEncoding =
[Console]::OutputEncoding = [Console]::InputEncoding =
[System.Text.Encoding]::utf8
Looks like that was indeed the issue... Thank you.
When using CTRL+T and selecting a file with Japanese characters the returned path is incorrect.
As an example
#Robomeme 😿😱ミャーーー 素材配布 #hololive #ホロライブ #猫ミーム [q5WTgxw8Trw].webm
becomes#Robomeme 仭亞繝溘Ε繝シ繝シ繝シ 邏譚宣・蟶・#hololive #繝帙Ο繝ゥ繧、繝・#迪ォ繝溘・繝 [q5WTgxw8Trw].webm