Problem: For some odd reason, the windows zip util will not zip up folders with Unicode file names. So, I need to convert a large set of filenames
It took me a while, since I am not a powershell guy clearly... but it worked, and I am sharing!!
cd c:\MyDirectoryWithCrazyCharacterEncodingAndUnicode
Copy and past the script in your Powershell windows
foreach($FileNameInUnicodeOrWhatever in get-childitem)
{
$FileName = $FileNameInUnicodeOrWhatever.Name
$TempFile = "$($FileNameInUnicodeOrWhatever.Name).ASCII"
get-content $FileNameInUnicodeOrWhatever | out-file $TempFile -Encoding ASCII
remove-item $FileNameInUnicodeOrWhatever
rename-item $TempFile $FileNameInUnicodeOrWhatever
# only if you want to debug
# write-output $FileNameInUnicodeOrWhatever "converted to ASCII ->" $TempFile
}
While searching I also found out how to fix the encoding for others, for people who keep getting output encoding to ASCII or Unicode all the time, you can set output encoding to whatever encoding you want from Microsoft blog $OutputEncoding
Issues 1, 2, 3 for bulk Hex to Ascii just replace the file names with variable you want to input