LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-09-2006, 08:09 AM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
emails with funny characters =e9 =3d


Hello,

Occasionally one of customers sends emails to all of their customers. The most recent was a job offer. The messages did not display correctly on a number of machines. It appeared as follows:

Les personnes int=E9ress=E9es =E0 poser leur candidature ou =E0 obtenir de plus amples renseignements sur le poste, sont pri=E9es de communiquer

If you know french, or any western language with accents, you'll realize that =E0 should be à and =E9 should be é.

I believe the problem lies in the headers, there should probably be a header that says that the content encoding is.

I am using Pear::Mail to send the messages. I thought Pear would do this itself, anyone know what header needs to be modified/added/deleted so that these emails display correctly?

Do I pass it in the headers or is there a function in Pear to do this?

Thanks,

David
 
Old 08-09-2006, 08:25 AM   #2
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30
Upon closer inspection of the email I found that the charset is set.

So why would so many clients display the wrong information?

--=_e2b8a00f81d023c6dac04e7a3c50ef38
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
 
Old 08-09-2006, 08:31 AM   #3
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30
I also tried using htmlentities, but I guess email clients don't like é and others. It was a lot worse like that.
 
Old 08-09-2006, 08:41 AM   #4
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
This is what the subject header looks like if I use German unlauts in Mozilla Thunderbird. Note that the encoding is specified in the header itself, maybe your headers should look similar:
Code:
Subject: =?ISO-8859-15?Q?=F6=E4=FC?=
(The actual subject I typed was: öäü)
 
Old 08-09-2006, 09:05 AM   #5
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by spirit receiver
This is what the subject header looks like if I use German unlauts in Mozilla Thunderbird. Note that the encoding is specified in the header itself, maybe your headers should look similar:
Code:
Subject: =?ISO-8859-15?Q?=F6=E4=FC?=
(The actual subject I typed was: öäü)

My subject also contains a similiar message, except it uses ISO-8859-1, and the subject appears correctly. It's really just the body that is messed up.

David
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How get rid of funny characters in filenames? Bengan Mandriva 11 01-07-2006 11:38 AM
convert html emails to plain text emails andredude Linux - General 6 03-20-2005 12:33 PM
Apache 2.0.52 funny characters on web page mnauta Linux - Networking 1 12-03-2004 12:24 AM
Just something funny... Whitehat General 5 01-01-2004 11:55 AM
funny characters in man pages durden2.0 Linux - General 4 06-27-2003 12:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration