[checkout e-mail] change charset for text/plain email

bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 07:08

Hello,

Do you know where to change charset for e-mail sent in text/plain mode?

I have problems with accents because of the charset (us-ascii).

Thank you for your suggestions
Benoît

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 07:25

Actually I'm pretty sure it's already set to UTF-8. I'll have a look later though.

 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 08:27

Yes, but for HTML only.

--checkout48bce1781067c
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: 8bit
--checkout48bce1781067c
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: 8bit
 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 08:49

Hi Benoit,

This is what I get:

...
--checkout48b59995ad535
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit
Order Number: 71158



Thank You!
...

It's set in the four templates in checkout/templates/email - confirm.tpl, paid.tpl, complete.tpl and notify.tpl - look for

--{$boundary}
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit

Do you want to investigate why it's coming out wrong in your installation and let me know?

 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 10:17

Hi Alec,

Here's what I have in confirm.tpl, paid.tpl and notify.tpl

--{$boundary}
{assign var=rendering value='text'}
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit

The only difference is in notify.tpl where the line below is not present

{assign var=rendering value='text'}

Yes, would like to investigate but I have no idea where to search the problem. If you have suggestions...

What I see different between text/plain and text/html is the mention "charset="

--{$boundary}
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 10:42

Unfortunately, that doesn't change anything, I always have the same output in the email:

--checkout48bd12e96513f
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: 8bit

----

Update: I had edited the wrong file... (in another subdomain)

Now I have that in the source of the e-mail

--checkout48bd1700d567a
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit

This should work, but it always displays strange characters in my webmail instead of accents.

I'll try with another webmail to see if it comes from that.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 11:01

Did you try setting "charset=UTF-8" in your template instead?

 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 11:40

Yes, I have now in confirm.tpl

Content-Type: text/plain; charset=utf-8

and I tried with

Content-Type: text/plain; "charset=utf-8"

but both return the same in the e-mail

--checkout48bd1f2f6a5d6
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit

I don't understand why I don't have "charset=" in the e-mail

text/html in confirm.tpl

--{$boundary}
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
{assign var=rendering value='html'}

...

text/html part in e-mail source

--checkout48bd206676934
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

...

text/plain in confirm.tpl

--{$boundary}
{assign var=rendering value='text'}
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

...

text/plain part in e-mail source

--checkout48bd206676934
Content-Type: text/plain; utf-8
Content-Transfer-Encoding: 8bit

...

The only thing that changes in the template is "/plain" "/html"

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 11:48

You're not changing the correct template file then, otherwise the changes show up instantly. Make sure you don't have one in a /local/ directory, or if you do then make sure to change that one.

 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 13:04

It works :-)

I was again editing the wrong file...

Thank you very much for your help

 
babuji

Joined: 2008-09-02
Posts: 1
Posted: Tue, 2008-09-02 13:14

Hi bro,

It's only a test. Don't mind.

Thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 14:29
Quote:
It works :-)

What's the solution?

 
bchantre

Joined: 2005-11-16
Posts: 55
Posted: Tue, 2008-09-02 14:38

Just change

Content-Type: text/plain; utf-8

by

Content-Type: text/plain; charset=utf-8
 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-02 14:42

Thanks - I'll make those changes in the distribution.