| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
|    52% | Total: 114 | All time:  9,593 This week: 39  | ||||
| Version | License | PHP version | Categories | |||
| charset-from-string 1.0.6 | Custom (specified... | 5 | Localization, PHP 5, Text processing, L... | 
| Description | Author | |
| This class can identify predominant character set in a string. Innovation Award | 
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>
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
|  Files (4) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (1 file) | ||||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE | Lic. | License text | ||
|    README.md | Doc. | Documentation | ||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
|  | charset-from-string-2020-10-20.zip 7KB | 
|  | charset-from-string-2020-10-20.tar.gz 7KB | 
|  | Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| User Ratings | ||||||||||||||||||||||||||||||
| 
 | ||||||||||||||||||||||||||||||
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.