East Asia character(Chinese,Janpanse,Korean) encoding auto-detection in JavaScript (port of python's chardet)