>> |
08/24/11(Wed)16:56 No.7784320>>7784293 Hm,
I tried it on a gb18030 file and it thought it was gb2312. You should
probably also let it take the input file as an argument (in addition to
the option to pipe it on STDIN). I do like how it shows the encoding
name and confidence level, though.
Actually, now that I think
about it, these scripts should just use iconv to do the actual decoding,
since iconv supports every character encoding under the sun and is
installed by default on pretty much every *nix. |