GcinTablesXcin02: gcin-filter-sim2trad

File gcin-filter-sim2trad, 303 bytes (added by caleb, 2 years ago)
Line 
1 #! /bin/bash
2 # gcin-filter-sim2trad version 0.0.3
3   read -r -t 1 aa
4   U2S=`echo -n $aa | iconv -f UTF-8 -t GB2312 -c`
5   S2U=`echo -n $U2S | iconv -f GB2312 -t UTF-8 -c`
6   if [ "$S2U" = "$aa" ]; then
7     echo -n $U2S | iconv -f GB2312 -t CP950 -c | iconv -f CP950 -t UTF-8 -c
8   else
9     echo -n $aa
10   fi