kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
795 stars 36 forks source link

Invoke-Fzf: fzf expects stdin/stdout encoding to be UTF-8 #45

Closed chenxiaolong closed 4 years ago

chenxiaolong commented 4 years ago

This commit changes the Invoke-Fzf function to send UTF-8 encoded text to the fzf process and read UTF-8 encoded text from stdout. Without this change, non-ASCII characters would not be handled correctly. For example:

$ echo '360°' | Invoke-Fzf
360�
$ echo '360°' | fzf
360°

After the change:

$ echo '360°' | Invoke-Fzf
360°

Signed-off-by: Andrew Gunnerson chillermillerlong@hotmail.com

kelleyma49 commented 4 years ago

Thank you for the pull request!

kelleyma49 commented 4 years ago

A prerelease version including this change has been published: https://www.powershellgallery.com/packages/PSFzf/1.2.7-alpha

chenxiaolong commented 4 years ago

Thank you!