note 71872 added to function.mb-convert-encoding
| From: | DavidHull at osu1 dot php dot net | Date: | Wed, 20 Dec 2006 18:52:40 +0000 |
| Subject: | note 71872 added to function.mb-convert-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120794@lists.php.net to get a copy of this message | ||
As an alternative to Johannes's suggestion for converting strings from other character sets to
a 7bit representation while not just deleting latin diacritics, you might try this:
<?php
$text = iconv($from_enc, 'US-ASCII//TRANSLIT', $text);
?>
The only disadvantage is that it does not convert "ä" to "ae", but it handles
punctuation and other special characters better.
--
David
----
Server IP: 64.71.164.2
Probable Submitter: 63.251.211.5
----
Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php
Edit -- https://master.php.net/note/edit/71872
Del: integrated -- https://master.php.net/note/delete/71872/integrated
Del: useless -- https://master.php.net/note/delete/71872/useless
Del: bad code -- https://master.php.net/note/delete/71872/bad+code
Del: spam -- https://master.php.net/note/delete/71872/spam
Del: non-english -- https://master.php.net/note/delete/71872/non-english
Del: in docs -- https://master.php.net/note/delete/71872/in+docs
Del: other reasons-- https://master.php.net/note/delete/71872
Reject -- https://master.php.net/note/reject/71872
Search -- https://master.php.net/manage/user-notes.php