Created
June 9, 2013 09:59
-
-
Save kenpusney/5743005 to your computer and use it in GitHub Desktop.
view-chinese in utf-8.. Author: Kim Leo
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
#!/usr/bin/env bash | |
usage() { | |
echo "Usage: vc.sh <file>"; | |
echo "view-chinese in utf-8.. Author: Kim Leo"; | |
exit; | |
} | |
[ $# -eq 0 ] && usage; | |
TMP="/tmp/cview.tmp.$1"; | |
enca -L zh -x UTF-8 < $1 > $TMP | |
vi $TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment