note 111939 added to transliterator.transliterate
| From: | simonsimcity at gmail dot com | Date: | Mon, 15 Apr 2013 18:11:20 +0000 |
| Subject: | note 111939 added to transliterator.transliterate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194480@lists.php.net to get a copy of this message | ||
I pretty much like the idea of hdogan, but there's at least one group of characters he's
missing: ligature characters.
They're at least used in Norwegian and I read something about French, too ... Some are just
used for styling (f.e. ï¬)
Here's an example that supports all characters (should at least, according to the
documentation):
<?php
var_dump(transliterator_transliterate('Any-Latin; Latin-ASCII; Lower()', "A æ
Ãbérmensch pÃ¥ høyeste nivÃ¥! Ð Ñ Ð»ÑÐ±Ð»Ñ PHP! ï¬"));
// string(41) "a ae ubermensch pa hoyeste niva! i a lublu php! fi"
?>
In this example any character will firstly be converted to a latin character. If that's
finished, replace all latin characters by their ASCII replacement.
----
Server IP: 87.106.1.137
Probable Submitter: 212.144.254.202
----
Manual Page -- http://php.net/manual/en/transliterator.transliterate.php
Edit -- https://master.php.net/note/edit/111939
Del: integrated -- https://master.php.net/note/delete/111939/integrated
Del: useless -- https://master.php.net/note/delete/111939/useless
Del: bad code -- https://master.php.net/note/delete/111939/bad+code
Del: spam -- https://master.php.net/note/delete/111939/spam
Del: non-english -- https://master.php.net/note/delete/111939/non-english
Del: in docs -- https://master.php.net/note/delete/111939/in+docs
Del: other reasons-- https://master.php.net/note/delete/111939
Reject -- https://master.php.net/note/reject/111939
Search -- https://master.php.net/manage/user-notes.php