DownloadCharset From String
Identifies predominant script (charset, language) in a string. This library is capable of identifying:
<pre>
Arabic
Armenian
Bengali
Burmese
CJK
Cyrillic
Devanagari
Georgian
Greek
Gujarati
Hebrew
Japanese
Khmer
Korean
Lao
Latin
Malayalam
Sinhala
Tamil
Thai
Tibetan
</pre>
Usage
use peterkahl\CharsetFromString\CharsetFromString;
echo CharsetFromString::getCharset('????? ????? ?? ???????')."\n"; # ARABIC
echo CharsetFromString::getCharset('????? ????? ?? ????-??')."\n"; # HEBREW
echo CharsetFromString::getCharset('??? ?????? ?????? ??????, ??? ??? ?? ?????.')."\n"; # CYRILLIC
echo CharsetFromString::getCharset('Lex iniusta non est lex.')."\n"; # LATIN
echo CharsetFromString::getCharset('??? ??? ?? ??? ??? ???? ??.')."\n"; # KOREAN
echo CharsetFromString::getCharset('??????????????')."\n"; # JAPANESE
echo CharsetFromString::getCharset('??????????')."\n"; # CJK
echo CharsetFromString::getCharset('??????????????? ??????????????')."\n"; # THAI
echo CharsetFromString::getCharset('????????????????????????????????????? ????')."\n"; # LAO
echo CharsetFromString::getCharset('?????????????????????????????????????????????')."\n"; # KHMER
echo CharsetFromString::getCharset('???????????????????????????????')."\n"; # TIBETAN
echo CharsetFromString::getCharset('? ????? ???????? ??? ???????? ?????? ????, ???? ???????? ???? ??? ??????.')."\n"; # GREEK
|