visual charset detector implemented by Java