quintroo
quintroo

Reputation: 75

html looks weird in outlook, but ok in browser

I'm doing mailings, which contains html code. If I check my HTML in IE or FF, everything looks great. But when I sent the mail, the characters become very weird:

In browser: Information générale ,In E-mail : Information g�n�rale

My HTML meta: <meta http-equiv="content-type" content="text/html; charset=UTF-8">

Clearly this has something to do with the encoding, but I don't get why it looks OK in a browser and not in the email...

I have other HTML emails (newsletters received from other persons) which use the same HTML meta, and those emails look just fine..

Upvotes: 1

Views: 1521

Answers (2)

Pekka
Pekka

Reputation: 449683

� is an indication that the browser/E-Mail client uses UTF-8 to render the document, but encountered an invalid character from a different encoding.

It isn't enough to set the content-type meta tag; your data actually needs to match the encoding you're declaring.

If it comes from a file, make sure the file is encoded as UTF-8 (usually, the editor will offer you a setting in the "Save as...." dialog.)

If it comes from a database, see UTF-8 all the way through

Upvotes: 1

Tobi
Tobi

Reputation: 1312

In the email you have one more place to add an encoding: - The mail header - the mine header - if content is text/HTML in the HTML header

All of these need to be set right.

Sorry for short answer. Writing this on my cellphone.

Upvotes: 0

Related Questions