#32497 [Opn]: Quotes from iso-8859-1 get converted incorrectly
| From: | mschering at intermesh dot nl | Date: | Wed, 30 Mar 2005 08:07:46 +0000 |
| Subject: | #32497 [Opn]: Quotes from iso-8859-1 get converted incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76040@lists.php.net to get a copy of this message | ||
ID: 32497
User updated by: mschering at intermesh dot nl
Reported By: mschering at intermesh dot nl
Status: Open
Bug Type: ICONV related
Operating System: Linux 2.6
PHP Version: 4.3.10
New Comment:
I discovered that the following ascii characters go bad with iconv
(Maybe more but these I found).
133, 146, 147, 148
I now workaround like this:
$str = str_replace(chr(133), ".", $str);
$str = str_replace(chr(146), "'", $str);
$str = str_replace(chr(147), '"', $str);
$str = str_replace(chr(148), '"', $str);
Previous Comments:
------------------------------------------------------------------------
[2005-03-30 08:58:29] mschering at intermesh dot nl
Description:
------------
When I convert an iso-8859-1 text that contains quotes (The mail
message I tested was composed with Microsoft Outlook Express
6.00.2600.0000) They get converted to an character that displays as a
cubic character so it doesn't exists.
Don't know if it's relevant but before using quoted_printable_decode()
one of the characters that is diplayed wrong is written as =92
Reproduce code:
---------------
Compose a mail message with outlook express in iso-8859-1 encoding and
put some ' and " in it. Convert that with iconv and you'll see
unexpected results.
Expected result:
----------------
I expect the text to be the same as when I view it in iso-8859-1
encoding.
Actual result:
--------------
Strange characters in the converted text.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32497&edit=1