some hotmail and gmail can't render French characters

M

Mike S

What is the best way to send French characters in the hopes that Google
and Hotmail users will see the characters correctly?

I added code like this for 33 characters in an effort to avoid problems:

$message = str_replace("À", "À", $message); // Capital A-grave

Right now the email uses 8 bit encoding, and the 'win-1256',
'us-ascii'character sets.

If this is the wrong group for this question I apologize, please
recommend the appropriate group, thanks.
 
J

Jukka K. Korpela

What is the best way to send French characters in the hopes that Google
and Hotmail users will see the characters correctly?

E-mail messages that contain anything but Ascii characters should have
Content-Type header specifying the character encoding as well as a
Content-Transfer-Encoding header. The receiving e-mail program is
expected to use this information.

However, e-mail programs are not perfect, and neither are their users.
There are even programs that have a setting that overrides the declared
encoding and use a fixed encoding instead.

So to stay on the safe side when sending HTML e-mail, encode all
non-ASCII characters using entity references and character references.
I added code like this for 33 characters in an effort to avoid problems:

$message = str_replace("À", "À", $message); // Capital A-grave

There are about 100,000 different characters that may appear in an HTML
document. So instead of hand-coding some expected characters, use a
suitable general tool. As you seem to be using PHP, check out
http://php.net/manual/en/function.htmlentities.php

You could then send the message even without any information about
encoding, but for safety, it is best to explicitly declare us-ascii.
 
M

Mayeul

Right now the email uses 8 bit encoding, and the 'win-1256',
'us-ascii'character sets.

Other advices are very correct.

Also, do try windows-1252 instead of 1256. Arabic script isn't too great
to convey French. ;)
 
A

Andreas Prilop

Also, do try windows-1252 instead of 1256. Arabic script isn't too
great to convey French. ;)

Actually, Windows-1256 is made to cover French (at least small letters)
because French is an important language in several Arab countries.
Therefore ISO-8859-6 and Windows-1256 differ in the arrangement of
Arabic letters.
 
M

Mayeul

Actually, Windows-1256 is made to cover French (at least small letters)
because French is an important language in several Arab countries.
Therefore ISO-8859-6 and Windows-1256 differ in the arrangement of
Arabic letters.

Jeez, I never noticed that. Thank you for the correction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top