Here's the problem: when a browser renders a document, it needs to know
what encoding it is in. For HTML documents, this is specified by a meta tag

    <meta charset="UTF-8">

However, with a plain text document, there is no way to specify the
encoding, so, instead, browsers must use a default. From what I can tell,
most default to cp1252 (aka, Windows-1252), *not* UTF-8. Hence, if we
encode the NOAA documents in UTF-8, the browser will not know it and,
instead, will default to cp1252, giving odd results.

The good news is that the Danish characters can be encoded using cp1252, so
use that as the encoding. I.e.,

    [[SummaryByMonth]]
        # Reports that summarize "by month"
        [[[NOAA_month]]]
            encoding = cp1252
            template = NOAA/NOAA-%Y-%m.txt.tmpl

This will only work with V4.4.1 and later (not released yet).

You can understand that we can't make this the default for the NOAA reports
because not all characters can be encoded in cp1252. If a character cannot
be encoded, then an exception is raised, terminating the report. So,
normalized_ascii was chosen for the default.

-tk




On Mon, Feb 22, 2021 at 1:03 PM [email protected] <[email protected]>
wrote:

> Hi Tom
> At #1 you wrote:
> NOAA reports now use a 'utf8' encoding instead of 'strict_ascii'. This
> will only
> affect new installations. Fixes issue #644.
>
> When I look at the skin.conf, utf8 has disappeared as a choice:
> # Possible encodings include 'html_entities', 'strict_ascii',
> 'normalized_ascii',
>
> normalized_ascii will not show danish characters correct(æåøÆÅØ)
>
> From the NOAA report:
> normalized_ascii:
> NAME: Vester Smarken, Bornholm
>
> With utf8:
> NAME: Vester Sømarken, Bornholm
>
> Rgds
> Gert
>
>
>
>
>
>
> On Saturday, February 6, 2021 at 10:48:39 PM UTC+1 [email protected] wrote:
>
>> My first upgrade of Wewwx (after years on wview). Upgraded from 4.1.1 to
>> 4.4.0 with Belchertown 1.2 on a Ubuntu 20.04 VM using the setup.py method.
>> Wow that was smooth... Great software and wonderful community.
>>
>> On Thursday, February 4, 2021 at 7:14:28 AM UTC-7 [email protected]
>> wrote:
>>
>>> Meanwhile I would add, that the update was without problems in my case
>>> (Ubuntu apt-get upgrade). I use Belchertown skin and some additional
>>> uploaders.
>>>
>>> Vetti52 schrieb am Donnerstag, 4. Februar 2021 um 11:04:43 UTC+1:
>>>
>>>> Hi,
>>>> maybe a new thread would be helpful, because the issue is/was very
>>>> special and might not be a problem with version 4.4.0:
>>>>
>>>> After I realized, that weewx could be run manually, I was inspecting,
>>>> what was the difference. I had updated to version 4.4.0 and also had an
>>>> update for my Zigbee device driver (deCONZ). Then I had to reboot the
>>>> Raspberry Pi and after that the error occured. Finally I realized, that,
>>>> the /etc/init.d/weewx start failed, with code=exited but no success. I
>>>> misinterpreted this as that weewx was not running, since there were no
>>>> syslog entries at all. Repeating to start weewx using the previous
>>>> interceptor driver did not work either. So I decided to let it run with
>>>> gw1000 driver, but started it manually with sudo weewxd
>>>> /etc/weewx/weewx.conf >nul &.  This was successful, and went to
>>>> sleep....
>>>> Today I decided to look at this issue again and, instead of killing the
>>>> manually started weexd properly, I accidently used /etc/init.d/weewx
>>>> stop, which indeed stopped weewx, but the manually started weewxd
>>>> continued. After I stopped this too, I realized, that weewx had in fact
>>>> been started autmatically after reboot, but got stuck, as you say, because
>>>> of the gw1000 driver. What I did not expect, is, that weewx then did not
>>>> exit. Any additional starting command therefore failed. I was cind of
>>>> silly, not to look at that, sorry. After stopping the hanging weewx, I
>>>> could start weewx as expected, and now it works without any issues. Maybe,
>>>> it would be better not to start weewx with its init.d script, but with 
>>>> systemctl
>>>> using a separate weewx.service file which should contain a stanza like
>>>>
>>>> [Unit]
>>>> After=network-online.target
>>>>
>>>> that would avoid to start weewx before network is up, which seems to be
>>>> a crucial step for gw1000. But this should be another thread, I think.
>>>>
>>>> Thanks
>>>> Peter
>>>> gjr80 schrieb am Mittwoch, 3. Februar 2021 um 20:33:21 UTC+1:
>>>>
>>>>> Ok, can you please set debug=1, restart WeeWX as a daemon and post in
>>>>> a new thread the log through until the failure occurs.
>>>>>
>>>>> Gary
>>>>>
>>>>> On Thursday, 4 February 2021 at 05:28:00 UTC+10 Vetti52 wrote:
>>>>>
>>>>>> just to narrow down my problem:
>>>>>>
>>>>>> When starting manually
>>>>>>  weewxd /etc/weewx/weewx.conf
>>>>>> it works. Starting with
>>>>>> systemctl start weewx,
>>>>>> it fails.
>>>>>> Maybe, I will find out, what makes the difference. But, just in case,
>>>>>> someone knows the trick, please tell!
>>>>>>
>>>>>> Thanks
>>>>>> -Peter
>>>>>>
>>>>>> Vetti52 schrieb am Mittwoch, 3. Februar 2021 um 18:20:07 UTC+1:
>>>>>>
>>>>>>> Typo: Upgrade from 4.3.0 to 4.4.0.
>>>>>>> Version 4.3.0 had no issues so far.
>>>>>>>
>>>>>>> Vetti52 schrieb am Mittwoch, 3. Februar 2021 um 18:17:46 UTC+1:
>>>>>>>
>>>>>>>> Just upgraded from 4.4.3 to 4.4.0, but it fails.
>>>>>>>> got this in systemctl status weewx.service:
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****      debug_wind=self.debug_wind)
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****    File "/usr/share/weewx/user/gw1000.py", line
>>>>>>>> 2166, in __init__
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****      
>>>>>>>> lost_contact_log_period=lost_contact_log_period)
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****    File "/usr/share/weewx/user/gw1000.py", line
>>>>>>>> 2915, in __init__
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****      ip_port_list = self.discover()
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****    File "/usr/share/weewx/user/gw1000.py", line
>>>>>>>> 3005, in discover
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****      socket_obj.sendto(packet,
>>>>>>>> (self.broadcast_address, self.broadcast_port))
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> weewx.engine:     ****  OSError: [Errno 101] Das Netzwerk ist nicht
>>>>>>>> erreichbar
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL __main__:
>>>>>>>> Unable to load driver: [Errno 101] Das Netzwerk ist nicht erreichbar
>>>>>>>> Feb 03 16:44:25 RaspBee python3[629]: weewx[629] CRITICAL
>>>>>>>> __main__:     ****  Exiting...
>>>>>>>>
>>>>>>>> Hopefully someone knows, what to do.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> -Peter
>>>>>>>>
>>>>>>>> [email protected] schrieb am Dienstag, 2. Februar 2021 um 03:48:05
>>>>>>>> UTC+1:
>>>>>>>>
>>>>>>>>> Updated this morning on Debian 10.7 and after several minutes of
>>>>>>>>> updating the DB, everything came up working smooth as silk.
>>>>>>>>>
>>>>>>>>> Good show!
>>>>>>>>>
>>>>>>>>> - Nate
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> "The optimist proclaims that we live in the best of all
>>>>>>>>> possible worlds. The pessimist fears this is true."
>>>>>>>>>
>>>>>>>>> Web: https://www.n0nb.us
>>>>>>>>> Projects: https://github.com/N0NB
>>>>>>>>> GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
>>>>>>>>>
>>>>>>>>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/ff73a836-106f-4a62-9c69-4652ad6c40c4n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/ff73a836-106f-4a62-9c69-4652ad6c40c4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAPJKogPNUzDO%3DaKDqfQg%2BcRSCgZkH8iV-Dk16DjU3XLQ%40mail.gmail.com.

Reply via email to