Created
June 21, 2018 13:47
-
-
Save yoh2/de225b8bd95d7f43c735b694254f858e to your computer and use it in GitHub Desktop.
片っ端から iconv 変換を試してみる
This file contains 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/bash | |
readonly infile=hoge.txt | |
iconv -l | while read enc; do | |
if iconv -f $enc -t utf-8 < $infile > tmp.txt 2>/dev/null; then | |
cat tmp.txt | |
echo -- | |
echo $enc | |
echo ========================== | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment