idrassi / DirHash

Windows command line utility to compute hash of directories and files
BSD 3-Clause "New" or "Revised" License
111 stars 11 forks source link

feature request: ASCII/UTF-8 output #24

Closed RalMay closed 1 year ago

RalMay commented 1 year ago

Thanks for a nifty program! Unfortunately your output is binary data, not ASCII/UTF-8 which means one cannot use find or grep* in a batch file to check for a specific hash result.

So pls give an option to just output an ASCII/UTF-8 string.

. . * workaround:

idrassi commented 1 year ago

Indeed, DirHash prints output to Windows terminal in UTF-16 mode in order to be able to correcty display Unicode file names. I will implement a switch to print output in UTF-8 which will help you in your use case. I will let you known.

idrassi commented 1 year ago

I ended up changing DirHash output format to UTF-8 by default since it doesn't seem to impact the printing of Unicode characters to the console. Here is the commit: https://github.com/idrassi/DirHash/commit/58a666dd5c0aaa25f4ce5a637af8756a502b685e

I have done tests using find and it works well now. So the new version that I will publish soon will solve your issue without adding any new switch 😀