Last active
October 25, 2020 06:32
-
-
Save SuibianP/47a9a0c6106798a737b6cda28bf4e4ea to your computer and use it in GitHub Desktop.
Shell script resolution for garbled Chinese-encoded Japanese UTAU voicebanks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for f in ./* | |
do | |
mv $f `echo $f | iconv -f UTF-8 -t GBK | iconv -f shift-jis -t UTF-8` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or a one-liner that can be directly executed, of course
for f in ./*; do mv $f `echo $f | iconv -f UTF-8 -t GBK | iconv -f shift-jis -t UTF-8`; done
This method works well with filenames in the mojibake form of
_偁偁偄偁偆偊偁.wav
.The reason for not using
convmv
is that it does not accept the nonsense produced in the middle of the conversion.I find this way works kind of more elegant than 菲菲更名宝贝.
Please do test out the result of
iconv
command before the actual conversion.