Page 1 of 1

w3c html 5 encoding

Posted: Sat 31 Dec 2011 2:16 am
by n9mfk
Hi All,
I have w3c html 5 question

if i use utf-8

i get

Code: Select all

 M�t�o du Qu�bec
if i use iso-8859-1

Code: Select all

 Météo du Québec 
that good but then i get this error
from w3c Using windows-1252 instead of the declared encoding iso-8859-1.
what wood the fix be ?
Beau

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 9:32 am
by mcrossley
If you have both declared the file encoding to be utf-8 and 'actually' encoded the file to utf-8 then you should see no corruption. It looks like you missed one or the other. Same for 8859-1, you have possibly declared the file 8859-1, but left the physical encoding as the default Windows 1252.

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 2:29 pm
by n9mfk
hi Mark,
the file are ansi i tried iso-8859-1 but i still get Using windows-1252 instead of the declared encoding iso-8859-1.
Beau

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 2:33 pm
by mcrossley
Yes but you have to save the file in the same format as you are declaring within the file - no magic happens to perform the conversion for you.

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 2:53 pm
by n9mfk
hi Mark,

the file are saved in iso-8859-1 but i still get Using windows-1252 instead of the declared encoding iso-8859-1.
Beau

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 4:07 pm
by beteljuice
BTW - Most sites based on that template that I have visited display "the alternative character" or gibberish.

Presumeable because it has been encoded / saved in one standard, then edited / saved in another.

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 4:10 pm
by mcrossley
hi beau, attach the file here so we can take a look

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 7:34 pm
by n9mfk
Hi Mak Here are the files
the file im try to fix is the gauges-ss.php

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 7:53 pm
by mcrossley
beau, they were all encoded as Windows- 1252. I have changed the gauge-ss.php to utf-8 without a BOM, but I have had to add some extended characters to 'fix' the encoding.

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 9:44 pm
by n9mfk
Thanks Mark,
What Software did you use ?
thanks Beau

Re: w3c html 5 encoding

Posted: Sat 31 Dec 2011 10:15 pm
by mcrossley
Notepad++ though I normally use Komodo Edit for code now as it syntax checks as you type and is function/object/parameter aware as well.

edit: and the regex search and replace works, unlike Notepad++ where it is very restricted.