Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > some hotmail and gmail can't render French characters

Reply
Thread Tools

some hotmail and gmail can't render French characters

 
 
Mike S
Guest
Posts: n/a
 
      03-22-2012
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.
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-22-2012
2012-03-22 5:20, Mike S wrote:

> 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.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
 
Reply With Quote
 
 
 
 
Mayeul
Guest
Posts: n/a
 
      03-22-2012
On 22/03/2012 04:20, Mike S wrote:
> 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.

--
Mayeul
 
Reply With Quote
 
Andreas Prilop
Guest
Posts: n/a
 
      03-22-2012
On Wed, 21 Mar 2012, Mike S wrote:

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


Windows-1256 contains only small French letters ... uh, I mean
characters like .
http://www.unicode.org/Public/MAPPIN...OWS/CP1256.TXT

If you want capital letters too, use Windows-1252.

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/

 
Reply With Quote
 
Andreas Prilop
Guest
Posts: n/a
 
      03-22-2012
On Thu, 22 Mar 2012, Mayeul wrote:

> 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.
 
Reply With Quote
 
Mayeul
Guest
Posts: n/a
 
      03-26-2012
On 22/03/2012 17:55, Andreas Prilop wrote:
> On Thu, 22 Mar 2012, Mayeul wrote:
>
>> 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.


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

--
Mayeul
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Learn to speak French with rocket French. jose perez NZ Computing 1 12-24-2006 04:25 AM
Accessing rails render method outside of view / Decorating render Glenn Gillen Ruby 0 11-17-2006 02:30 PM
aspx page with Mailto and French characters Si Pearson ASP General 1 05-27-2005 10:40 AM
French characters and Perl gusmeister Perl 2 06-03-2004 03:32 AM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM



Advertisments