views:

17

answers:

1

I have a website which contains french, with accents "é, è, à,...".

The website displays fine in chrome but those symbols are messed up in firefox. I generated these pages with C# StreamWriter. I choose Encoding "UTF8".

I've tried with ISO-8859-1 and ASCII too with little succes.

Is there a way to figure out which encoding I can use that will display fine in every browser?

EDIT *

Ok here is a sum of what I've did

I read the file with Default encoding
I write it back to the drive with a StreamWriter

StreamWriter sw = new StreamWriter(path, false, Encoding.GetEncoding("ISO-8859-1"));

In every single page there is a meta tag

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Both of my browsers are set to Encoding -> ISO-8859-1

I still get errors in Firefox and Chrome displays fine.

If you want to see the page its

http://www.amrikart.com/centretechno.html

+1  A: 

You should set the Content-Type header (or the equivalent meta tag) to the encoding you used to generate the document, so the browser can reliably decode your content. Here is an article explaining the details. For international characters, a good choice of encoding is UTF-8.

If you don't feel you understand why this is necessary, or what the character encoding is; go read this article.

driis