Seite 1 von 1
Unicode characters support in HTML files
Verfasst: 31 Dez 2006 16:29
von flax
Hello!
Today I buy this great application for my WS-2300 weather station and I start using it on my web pages
http://pocasi.miksa.cz/ with some basic PHP history
http://pocasi.miksa.cz/historie.php
I found problem with HTML output, where unicode characters aren't supported, so Czech specific characters are displayed wrong as you can see on picture bellow. Exist some fix for that isssue?

Verfasst: 01 Jan 2007 16:09
von Werner
Hello,
it seems, that need to change to "customized Html/WML" files.
Here you can set your preferred CharSet
The program uses:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
Werner
Verfasst: 01 Jan 2007 18:44
von flax
Ok, so please where can I insert my charset setting <meta> information in file TEPLATE_D_.TXT?
==============================================
<customfile>
Template-Page %ws_typ%
Weather - %ws_location% %ws_altitude% over Sealevel
%ws_remark1%
Location-coordinatesn
Longitude: %ws_longitude% - Latitude %ws_latitude%
Date %longdate%
Time %ws_time% (%ws_utc%h = UTC-Time)%justify_on%
Time Outsen- Aussen- Luft- Tau- Wind- Regen Wind- Wind- Sonne Sonne
Temp. Feuchte druck punkt chill geschw. richt. Elevat. Azimut
-------------------------------------------------------------------------------------------
%templatebegin%%ws_time% %curval[0]%%curval[-1]%%curval[33]%%curval[43]%%curval[44]%%curval[34]%%curval[35]%%wind_txt% %ws_sunpos_el% %ws_sunpos_az%
-------------------------------------------------------------------------------------------
Durchs%avgval[0]%%avgval[-1]%%avgval[33]%%avgval[43]%%avgval[44]%%avgval[34]%%curval[35]%
Min. %minval[0]%%minval[-1]%%minval[33]%%minval[43]%%minval[44]%%minval[34]%%minval[35]%
Zeit %mintime[0]% %mintime[-1]% %mintime[33]% %mintime[43]% %mintime[44]% %mintime[34]% %mintime[35]%
Max. %maxval[0]%%maxval[-1]%%maxval[33]%%maxval[43]%%maxval[44]%%maxval[34]%%maxval[35]%
Zeit %maxtime[0]% %maxtime[-1]% %maxtime[33]% %maxtime[43]% %maxtime[44]% %maxtime[34]% %maxtime[35]%
Luftdruck:
%ws_baro1h%
%ws_baro2h%
%ws_baro3h%
%ws_baro12h%
%ws_baro24h%
Regen 1h: %rain1h% Regen Tag: %rainday% Regen 24h: %rain24h%
Zeit Solar Solar Sonnen
Org Prozent stand
---------------------------------------------------------------------%unit_on%%hour_only_off%
%templatebegin%%ws_time%%ws_msolars%%ws_msolarsproz% %ws_sunpos_el%
Mondalter %ws_moonage%
Mondaufgang %ws_moonrise%
Mondzenit %ws_moontransit%
Monduntergang %ws_moonset%
Sonnenaufgang gestern %ws_sunriseyest%
Sonnenaufgang %ws_sunrise%
Sonnenzenit %ws_suntransit%
Sonnenuntergang %ws_sunset%
Sonnenaufgang morgen %ws_sunrisetomo%
Bezugszeit %daylightname%
Sommerzeit Anfang %ws_summertimestart%
Sommerzeit Ende %ws_summertimeend%
%ws_copyright%
Verfasst: 01 Jan 2007 21:40
von Werner
Hello
I'm not sure wether this works, becaue vour example
is plain text.
Try:
Append after the open= variable
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</head>
Werner
Verfasst: 02 Jan 2007 21:41
von flax
I don't understand too much how to do it...
Verfasst: 03 Jan 2007 00:47
von Holli
For plain text this won't work. The Viewer is responsible to show the right character set. To show the text in a browser, put it in
Tags und set the character set like a normal set as shown above or tell the browser explicitly to show the page in ISO-8859-2.
For HTML you have to declare the charset like in Werner's example, but the correct set for czech is ISO-8859-2. More about this, the correct syntax and the place in a HTML-page you can find
here. (I hope it's in english though it's shown to me in german)
Unicode (multibyte) Support will not work, cause for this Werner would have to change the whole output of WsWin. You can find more about this near the explanation of your charset in SELFHTML.