Forums / Addon Language Packs / Charset and emails - swedish

Charset and emails - swedish

Locked

Views: 2,342

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
17 Nov 2010, 1:22 PM
#1
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Charset and emails - swedish

Hi
I'm working on my email templates atm, but are having issues with charset. I'm from sweden (and most of my customers to), so I need to be able to use some special characters. My charset seems to be a mess, everywhere I look there's a different one defined...

When I look at phpmyadmin my DB collation is set to latin1_swedish_ci. In includes/languages/swedish.php the charset is set to iso-8859-1. In the email templates I'm working with (the default ones in /email), the charset is defined as UTF-8.

I've figured out that utf-8 seems to support all special caracters I care about, but so do iso-8859-1 and -10 as well. Probably latin1-swedish-ci to ofcourse.

I got two issues with the email system:
(1) adding email languages. I've tried putting a folder with custom (swedish) emails in email/sv/, but even though Swedish is the default language in my Admin, the templates used is the default ones in /email/
For testing purposes, I'm currently replaced the templates in /email/ with my "swedish" ones.

(2) special characters in the emails. The charset(s) in my DB is latin1_swedish_ci, the swedish.php is iso-8859-1 and the emails utf-8.

(3) As of now, Google Mail displays the emails correctly, Hotmail does it not.

To get this issue solved, should i convert the DB to UTF-8 (export/search&replace in txteditor/import) and change every instance of charset to UTF-8?
Some of my customers most likely uses these special characters in their username/password and i do not want to mess that up.

19 Nov 2010, 9:30 AM
#2
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Re: Charset and emails - swedish

I solved it myself.

Notepad++ (which I primarily use) was set to "Encode with...something". By changing it to Encoding --> Character set --> Western europe --> ISO-8859-1 the problem went away. In the emails I specified to <meta ... "charset=$charset" />, with charset in my language file set to iso-8859-1.

Tip: have a look in the lower right corner of Notepad++ to view the current encoding...