Skip to content

Instantly share code, notes, and snippets.

@arosh
Created May 13, 2012 08:02
Show Gist options
  • Save arosh/2686865 to your computer and use it in GitHub Desktop.
Save arosh/2686865 to your computer and use it in GitHub Desktop.
そのディレクトリにあるHTMLをUTF-8に変換するシェルスクリプト
iconv --list
で指定できる文字コードが表示される
for s in *.html; do cp $s ${s%.html}.cp.html; done
for s in *.cp.html; do iconv -f CP932 -t UTF-8 < $s > ${s%.cp.html}.html; done
@arosh
Copy link
Author

arosh commented Aug 7, 2014

nkfの--overwriteを使ったほうが簡単です。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment