note 60109 added to function.utf8-decode
| From: | peter dot mescalchin at geemail dot com | Date: | Tue, 27 Dec 2005 05:43:13 +0000 |
| Subject: | note 60109 added to function.utf8-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100763@lists.php.net to get a copy of this message | ||
Adding to below I have a few more MS word characters that need replacing. Found this was required
when "fixing" some phpmyadmin export scripts from a live server where MS word characters
were all through the content - before importing them back into my local mySQL database.
The code I wrote for this process also does a strpos for any extra "\\xe2\\x80" strings -
which are the tell-tale sign of any funny characters I want removed.
Here are my updated arrays()
<?php
$badchr = array(
"\\xe2\\x80\\xa6", // ellipsis
"\\xe2\\x80\\x93", // long dash
"\\xe2\\x80\\x94", // long dash
"\\xe2\\x80\\x98", // single quote opening
"\\xe2\\x80\\x99", // single quote closing
"\\xe2\\x80\\x9c", // double quote opening
"\\xe2\\x80\\x9d", // double quote closing
"\\xe2\\x80\\xa2" // dot used for bullet points
);
$goodchr = array(
'...',
'-',
'-',
'\\'',
'\\'',
'"',
'"',
'*'
);
?>
----
Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60109
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60109&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60109&report=yes
Search -- http://master.php.net/manage/user-notes.php