For files that contain non ASCII symbols, The Sysinternals Handle utility prints the file names with ?
. A similar problem is also reported in the following places:
Reproduction scenario
- Open a file
C:\test\fileфайлファイル���件.pdf
in Adobe Acrobat Reader just to lock it. - Executing the following command in
cmd.exe
results in the file name being printed asC:\test\file??????????.pdf
:
C:\> handle64 -nobanner C:\test\fileфайлファイル文件.pdf
Acrobat.exe pid: 10616 type: File 440: C:\test\file??????????.pdf
- The same occurs if I redirect the output to a file by using the command
handle64 -nobanner C:\test\fileфайлファイル文件.pdf > 1.txt
. The file content will be the same as in a console. Opening the file in a HEX editor shows that?
signs are actual question marks with the codex3F
. Therefore, I assume that it is not a problem with the encoding on my machine.
Question
How can it be fixed or worked around?
Best workaround at the moment.
Binary patch from @NewcomerAl's answer fixes this issue. The patched binary can be downloaded from the Sysinternals-console-utils-with-Unicode-support GitHub repository.
chcp 65001
to use UTF8 encoding. Does that help?