note 94481 added to function.iconv
| From: | AndriesSeutens at osu1 dot php dot net | Date: | Sat, 07 Nov 2009 19:38:28 +0000 |
| Subject: | note 94481 added to function.iconv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162618@lists.php.net to get a copy of this message | ||
When doing transliteration, you have to make sure that your LC_COLLATE is properly set, otherwise
the default POSIX will be used.
To transform "rené" into "rene" we could use the following code snippet:
<?php
setlocale(LC_CTYPE, 'nl_BE.utf8');
$string = 'rené';
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
echo $string; // outputs rene
?>
----
Server IP: 217.71.118.186
Probable Submitter: 94.225.113.81
----
Manual Page -- http://www.php.net/manual/en/function.iconv.php
Edit -- https://master.php.net/note/edit/94481
Del: integrated -- https://master.php.net/note/delete/94481/integrated
Del: useless -- https://master.php.net/note/delete/94481/useless
Del: bad code -- https://master.php.net/note/delete/94481/bad+code
Del: spam -- https://master.php.net/note/delete/94481/spam
Del: non-english -- https://master.php.net/note/delete/94481/non-english
Del: in docs -- https://master.php.net/note/delete/94481/in+docs
Del: other reasons-- https://master.php.net/note/delete/94481
Reject -- https://master.php.net/note/reject/94481
Search -- https://master.php.net/manage/user-notes.php