You are here: Re: PHP E-mail characters changing « PHP Programming Language « IT news, forums, messages
Re: PHP E-mail characters changing

Posted by Andy Hassall on 07/20/07 16:04

On Fri, 20 Jul 2007 15:58:18 +0100, "Barry Morris"
<nospam.barry_morris@btinternet.com> wrote:

>I have a problem sending e-mails using PHP and a text area as the input
>field, some characters are been changed in IE6/7 but not FireFox, is there a
>workaround for this?
>
>Tîm Personèl (note the î and è) is coming through as Tîm PersonÚl

Single character changing to double characters - first impression is that it's
being turned into UTF-8 at some point.

>[big snip]

I couldn't see any character set encoding headers in either the PHP output or
the email - what are these set to for your page?

If you want to be able to send Western European characters, the preferred
encoding would be ISO-8859-15.

If you don't set any encoding, or you submit values outside the encoding of
the page, browsers aren't entirely consistent. Some will send the characters as
HTML numeric encoded entities ("&#1234;" etc.) which may then get decoded to
double bytes by the time it reaches the email.

The key point with dealing with anything outside the simple ASCII range is
that you always have to know how your data is encoded, and make sure that
encoding is passed along correctly to the next step.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация