
LAMP
UTF-8 in LAMP
- Posted by Rob (#1) on April 16, 2008 11:50 CEST
Here's a handy function returning an array of UTF-8 characters associated to a simple ASCII character. Can be useful when offering users an interface to browse by first character (0-9, A-Z) while actual data retrieval should obviously also include entries starting with a special character.
For example, browsableUtf8Characters("e") returns an array containing e. è, é, ê and ë which can easily be joined and then used in SQL like-queries.
Download browsableUtf8Characters.php or view the source first. (License: none really, enjoy!)
- PermaLink: UTF-8 in LAMP
- Tags: PHP, UTF-8, LAMP
- Post comment