sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.72k stars 389 forks source link

Powershell "y" alias decoding error. #1921

Closed Aqaao closed 15 hours ago

Aqaao commented 3 days ago

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

wezterm

yazi --debug output

None

Describe the bug

Windows powershell Chinese character decoding error when use "y" command.

Minimal reproducer

start yazi via "y" alias, select a path that contains Chinese characters, then press "q" quit yazi. 图片 图片

Anything else?

Resolved via add -Encoding UTF8 arg to Powershell wrapper function's line 4.

$cwd = Get-Content -Path $tmp  -Encoding UTF8 

Maybe docs should be modified to add this arg ?

Validations

sxyazi commented 3 days ago

I have no idea of how those PowerShell things work, so as usual, I'd like somebody else to confirm this is OK


Pinging @luiz00martins, sorry to bother you, but can you please confirm if -Encoding UTF8 is OK, since you're the original author of the PowerShell wrapper ;)

Xerxes-2 commented 1 day ago

Can you reproduce it in PowerShell 7+?

Aqaao commented 1 day ago

Can you reproduce it in PowerShell 7+?

I installed PowerShell 7 , it does not have this issue, error only occurs in the pre-installed PowerShell 5.

sxyazi commented 15 hours ago

Moved to https://github.com/yazi-rs/yazi-rs.github.io/issues/170 as it's an error with the doc not Yazi itself

Closing in favor of that issue