Skip to content

Instantly share code, notes, and snippets.

@kshimo69
Created August 30, 2009 13:31
Show Gist options
  • Save kshimo69/177960 to your computer and use it in GitHub Desktop.
Save kshimo69/177960 to your computer and use it in GitHub Desktop.
#!/bin/sh
euc2utf() {
for fname in $*
do
if [ -d $fname ]; then
echo "directory: $fname"
(cd $fname; euc2utf *;)
elif [ -f $fname ]; then
echo "file: $fname"
iconv -f euc-jp -t utf-8 $fname > tmp && mv tmp $fname
fi
done
}
euc2utf $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment