Character conversion error since upgrade.

47 views
Skip to first unread message

Phil Schaming

unread,
Oct 29, 2020, 1:36:06 PM10/29/20
to weewx-user

I've just upgraded from early 3.x version to 4.1.1 and there is a character conversion error.
The index.html.tmpl file contains the degree character(s) °F, and when the generated index.html file is displayed the character(s) now have °F.
These characters are used in a generated image.
I've searched for a fix and other than insuring this setting <meta charset="UTF-8">, I can't find a fix.   Any help would be appreciated.

Thanks in advance,
Phil

Tom Keffer

unread,
Oct 29, 2020, 7:26:39 PM10/29/20
to weewx-user
How to deal with non-ASCII characters is set by the option encoding in skin.conf:

[CheetahGenerator]

    # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
    encoding = html_entities

The sequence &#176; is an "HTML entity" for the degree sign.

If you set encoding to 'utf8', then UTF-8 will be used instead of HTML entities.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/555d0814-0c2a-4128-b0fb-e24b75931595n%40googlegroups.com.

Phil Schaming

unread,
Oct 30, 2020, 7:57:19 AM10/30/20
to weewx-user
Thanks.  That's exactly what I needed.  Wishing you the best in this covid-19 time.
Phil
Reply all
Reply to author
Forward
0 new messages