GcinTablesXcin02: gcin-filter-trad2sim

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