php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32497 Quotes from iso-8859-1 get converted incorrectly
Submitted: 2005-03-30 08:58 UTC Modified: 2005-04-07 01:00 UTC
From: mschering at intermesh dot nl Assigned:
Status: No Feedback Package: ICONV related
PHP Version: 4.3.10 OS: Linux 2.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-03-30 08:58 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-30 10:07 UTC] mschering at intermesh dot nl
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);
 [2005-03-30 17:14 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And DO NOT add such huge attachments into a bug report,
put them somewhere in the web and post an URL to it..

 [2005-04-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 06:01:30 2024 UTC