首页 > 解决方案 > 在 handle.exe 上设置 UTF-8 编码?

问题描述

我想获得在打开文件名中包含日文字符的进程 ID。

为此,我尝试使用handle.exe。但如下结果,我得到了非编码字符。你如何解决这个问题?

$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding

PS C:\pg\20190105072154> echo "あいうえお"
あいうえお
PS C:\pg\20190105072154> handle64.exe -p vlc.exe| sls "mp3"

  6A8: File  (RW-)   E:\_videos\_youtube_dl\_soundcloud_likes_you\85351791--????? - DAYS of DASH(Visko Remix)--Visko.mp3

标签: windowspowershellencoding

解决方案


推荐阅读