Page 1 of 1
Web pages encoding
Posted: Sun 12 Jan 2014 8:47 am
by laulau
Hi,
My web pages are encoded in "ANSI" with "charset=iso-8859-1" in header like Cumulus standard pages.
Some special pages need to be encoded in "utf8" to work properly, but this causes some accentuation problems!
http://meteo.laurentmey.fr/Viewdayfile/dayfile.php
http://meteo.laurentmey.fr/php/steelgauges.php
My links are in a included page (encoded in "ANSI") to facilitate updating.
What should i do to avoid these problems?
Thanks
Re: Web pages encoding
Posted: Sun 12 Jan 2014 2:17 pm
by beteljuice
Hmm .. the problem is Cumulus 'processes' pages as ANSII.
Taking the dayfile page as an example - the page is 'declared' as utf-8 and the php content is utf-8, and the browser thinks it's utf-8 (otherwise you wouldn't be able to see the wind direction arrows

).
The accented chars you have put in your nav menu are NOT utf-8 !
No guarantees - try
http://unicode-table.com
<click> the character you want, then <click> copy to clipboard, and paste back into your template code.
I'm not sure what (If anything) Cumulus will do with it
Edit: BTW - I hadn't realised the table cells were 'transparent' with null data.
change this part of the stylesheet:
Code: Select all
#table_container table td,table th {
background-color: #FFF; /* white - stop 'empty' cells being transparent */
width: 65px;
text-align: right;
padding: 2px 5px 2px 0px;
}
Re: Web pages encoding
Posted: Sun 12 Jan 2014 2:42 pm
by steve
What I would like to do is to convert the web pages supplied with Cumulus to HTML5, encoded as UTF-8, and save all processed web files as UTF-8. But this would presumably break anyone's own web pages which are not UTF-8 encoded? Offering the option of UTF-8 is possible, but a lot more work.
Re: Web pages encoding
Posted: Sun 12 Jan 2014 3:13 pm
by laulau
I put é instead of "é" and è for "è" and this did the trick
This was easy for a few words in my links but there are some more accentuated caracters in the prévision texts and in other strings.
If i want to convert all my web pages to utf8 i think i have to change a lot of "é" and "è" or "à" in Cumulus strings!
And i don't know how Cumulus will manage the parameters of the webtags.
Should i leave my pages as they are or is utf8 encoding needed ?
Re: Web pages encoding
Posted: Sun 12 Jan 2014 3:25 pm
by beteljuice
I put é instead of "é"
I tried that 'on-the-fly' with the FireFox inspect element etc. and for some reason it didn't work, but the cut'n'paste did
Changing your SITE to UTF-8 is a minefield, as you have to ensure all your doc types, meta tags, etc. etc. don't conflict.
If things work I would leave well alone for another day

Re: Web pages encoding
Posted: Sun 12 Jan 2014 4:04 pm
by laulau
If things work I would leave well alone for another day
It's a good idea for a sunday afternoon
