#32497 [Opn]: Quotes from iso-8859-1 get converted incorrectly

2005-03-30 Thread mschering at intermesh dot nl
 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.) 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=32497edit=1


#32497 [Opn]: Quotes from iso-8859-1 get converted incorrectly

2005-03-30 Thread mschering at intermesh dot nl
 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:

Here's the source of the message part that contains these characters:

--=_NextPart_001_010A_01C53499.35C327F0
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=3DContent-Type content=3Dtext/html; =
charset=3Diso-8859-1
META content=3DMSHTML 6.00.2600.0 name=3DGENERATOR
STYLE/STYLE
/HEAD
BODY bgColor=3D#ff
DIVFONT face=3DArial size=3D2
DIV
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoB=20
style=3Dmso-bidi-font-weight: normalSPAN lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: Arial?xml:namespace prefix
=3D =
o ns =3D=20
urn:schemas-microsoft-com:office:office =
/o:pOla!/o:p/SPAN/B/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoB=20
style=3Dmso-bidi-font-weight: normalSPAN lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
Arialo:p/o:p/SPAN/Bnbsp;/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY: ArialSTRONGMark en
=
Martijn=20
geven een vette fiesta en JIJ bent uitgenodigd! Doe je dansschoenen
aan, =
want de=20
sfeer is Latijns-Amerikaans... Dat betekent Salsa, Merengue en Mambo!
En =

natuurlijk vele cerveza=92s en andere lekkere=20
drankjes!o:p/o:p/STRONG/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY: ArialSTRONGWij
gaan =
2,5 maand=20
vakantie vieren in Mexico, Belize, Guatemala, Honduras, Nicaragua,
Costa =
Rica,=20
Panama, Equador, Chili, Peru en Bolivia, dus beschouw deze avond maar
=
als een=20
(voorlopig) laatste feestje in =
Nederland=85o:p/o:p/STRONG/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY: ArialSTRONGWe =
hebben trouwens=20
ook al de nodige publiciteit gehad over dit feest! Check maar eens in
de =
bijlage=20
het artikel dat afgelopen zaterdag in de Telegraaf =
stond=85/STRONG/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
ArialSTRONGo:p/o:p/STRONG/SPANnbsp;/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
ArialSTRONGDatum:/STRONGnbsp;16=20
april 2005o:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
ArialSTRONGLocatie:/STRONGnbsp;Caf=E9=20
De Deugnieto:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY:
ArialVerwerstraat=20
55o:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY: Arial5211 HT=20
=92s-Hertogenboscho:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
ArialSTRONGAanvang:nbsp;/STRONG21:00=20
uuro:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DNL=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: =
ArialSTRONGKledingtip:/STRONGnbsp;Zuid-Amerikaans=20
(Braziliaanse bikini en sombrero)o:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DEN-GB=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: =
EN-GBSTRONGKado-tip:/STRONGnbsp;Dollars=20
of Euroso:p/o:p/SPAN/P
P class=3DMsoNormal=20
style=3DMARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: autoSPAN=20
lang=3DEN-GB=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: =
EN-GBSTRONGRoutebeschrijving:/STRONGnbsp;Check=20
/SPANSPAN lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY:
ArialA=20
href=3Dhttp://www.anwb.nl/;SPAN lang=3DEN-GB=20
style=3Dmso-ansi-language: EN-GBwww.anwb.nl/SPAN/A/SPANSPAN
=
lang=3DEN-GB=20
style=3DFONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: =
EN-GB,=20
/SPANSPAN lang=3DNL style=3DFONT-SIZE: 10pt; FONT-FAMILY:
ArialA=20
href=3Dhttp://www.routenet.nl/;SPAN lang=3DEN-GB=20