#title Charset Detecting [[TableOfContents]] = 개요 = * 각 언어별 character set detecting 을 위한 library 및 API 정리 * Charset detecting 에는 크게 2가지 open 된 library 를 이용 * [https://www-archive.mozilla.org/projects/intl/chardet.html Mozilla Universal Charset Detect] * [http://icu-project.org/userguide/charsetDetection.html IBM International Components for Unicode Project] = 언어별 API = || 언어 || API 이름 || URL || || C++ || Mozilla (Original) || https://dxr.mozilla.org/mozilla-central/source/intl/chardet || || C/C++ || libchardet || https://github.com/Joungkyun/libchardet || || C# || UDE || https://github.com/errepi/ude || || Java || Jchardet || http://jchardet.sourceforge.net/ || || Python || chardet || https://chardet.github.io/ or https://github.com/Joungkyun/python-chardet (c-binding) || || Ruby || chardet || https://rubygems.org/search?query=chardet || || Perl || Encode-Detect || https://metacpan.org/pod/release/JGMYERS/Encode-Detect-1.01/Detector.pm || || PHP || mod_chardet || https://github.com/OOPS-ORG-PHP/mod_chardet || = 언어별 API 특징 = == Original Mozilla Code == * C++ 기반 * browser 코드에서 분리해 내기가 쉽지 않다. * 요즘 버전의 경우 intl/chardet/test 에 sample source 가 있어 무언가 여지가 있을 듯.. == Nchardet == * C# 용 API * Mozilla Universal Charset Detect Algorithm * 2016.05 현재 프로젝트 없어진 듯. * GitHub에 [https://github.com/errepi/ude UDE]라는 프로젝트가 있음 == Jchardet == * Java 용 chardet class API * Mozilla Universal Charset Detect Algorithm * sourceforge 에서 진행 중 * 역시 살펴 보지는 않았음 == py-chardet == * Python API * Mozilla Universal Charset Detect Algorithm * python pure code 로 작성 * 속도가 느린 단점 * 그래도 가장 유명함. (검색에 가장 많이 걸림) * 개발이 중단이 된 것 같고, 몇몇 forking version들이 있음 * https://github.com/chardet/chardet * https://pypi.python.org/pypi/chardet * python-chardet c binding module * pure code로 작성한 것이 느린 이유로 c binding으로 제작 * https://github.com/Joungkyun/python-chardet * libchardet 이 필요 * https://github.com/Joungkyun/libchardet == chardet ruby == * gem으로 여러가지를 지원한다. * https://rubygems.org/search?query=chardet 참조 == Encode-Detect == * Perl API * Mozilla Universal Charset Detect Algorithm * C++ binding 이라서 속도가 좋다. * 몇몇 언어에 대하여 버그가 있다. * 버그가 있으나, python chardet 보다는 정확도가 높다 == libchardet == * C/C++ library ( libchardet.so/libchardet.a support) * Mozilla Universal Charset Detect Algorithm * Encode-Detect 1.01 의 C++ binding 코드를 수정 * C wrapping API 제공 * Encode-Detect 의 버그 수정 * python chardet/Encode-Detect 보다는 정확도가 높다 * 2010/07 현재 libchardet 이 여러개가 존재한다. 대부분 Encode-Detect의 C++ binding 으로, frontend API가 조금씩 다르다. * https://github.com/Joungkyun/libchardet * http://code.google.com/p/libibase/source/browse/#svn/trunk/devel/libchardet * http://github.com/cnangel/libchardet/ * https://www.freedesktop.org/wiki/Software/uchardet/ == mod_chardet == * PHP API * libchardet / libicu / Python C API binding * Mozilla Universal Charset Detect Algorithm * ICU Conversion Charset Detection Alghrotim * Python Chardet bindng (with Python C API) * Requrires: libchardet that is distributed from oops.org