Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Bad reading nooa monthly e yearly report

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Bad reading nooa monthly e yearly report

Post by mcrossley »

The Saratoga template doesn't use UTF-8 encoding, so yes you have to manipulate the text like that to get it to display correctly. A UTF-8 encoded NOAA file embedded in a UTF-8 encoded HTML page <pre> displays just fine.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Bad reading nooa monthly e yearly report

Post by beteljuice »

Now't to do with the beteljuice.
The web page viewer simply wraps what is generated in <PRE> tags so that spaces / linefeeds are respected.

However Hans ... as you well know we are discovering an increasing amount of server / ftp combinations that are corrupting &deg; regardless of binary or ascii. (I think maybe something to do with binary 64 ?)

Although &deg; is one of the HTML5 preferred syntaxes, perhaps it should be replaced by whatever you finally found works for all ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR »

@Mark: OK apparently everybody has to find his own solution. Maybe I just change the default Saratoga encoding :)
@beteljuice:
beteljuice wrote: Thu 07 Nov 2019 1:14 pm However Hans ... as you well know we are discovering an increasing amount of server / ftp combinations that are corrupting &deg; regardless of binary or ascii. (I think maybe something to do with binary 64 ?)
Maybe... but see my next remark... :?
beteljuice wrote: Thu 07 Nov 2019 1:14 pm Although &deg; is one of the HTML5 preferred syntaxes, perhaps it should be replaced by whatever you finally found works for all ?
That whatever I found, works for all is actually not one solution: in my situation for CumulusUtils it means that I use "&deg;C" for HTML (having tried &#186; &#x00B0; and making some errors there) and "\u00B0C" for generated javascript. So far this works for me everywhere. :groan:
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Nevizio
Posts: 106
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: U.S.

Re: Bad reading nooa monthly e yearly report

Post by Nevizio »

mcrossley wrote: Thu 07 Nov 2019 11:56 am
Nevizio wrote: Thu 07 Nov 2019 11:25 am Another question I noticed in the dashboard interface but also in gauge (below I posted the image with the red arrow indicating the maximum value shown) the maximum value of the wind speed is 40 Km / h, as you can 'change this value?
A can of worms!

Short answer yes, in gauges.js

Change "windScaleDefMaxKmh" to what ever you want. (line 119 in the interface version of gauges.js)

But the code will change the max value depending on the data it is given - it will automatically increase the value as the wind speed approaches the current max value - and and what numbers will give a nice spread of figures and tickmarks.

Hi , where do I find this file? I searched everywhere :roll: :?:
Nevizio
Posts: 106
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: U.S.

Re: Bad reading nooa monthly e yearly report

Post by Nevizio »

I still have this strange character problem, I'd like to solve it, but how? :cry:
On the interface of cumulus mx I see well the file nooa on the web instead no.

in a simple way how is it solvable? :oops:

I send I upload the file to my server and on my site I have the link to the file that is natively a txt, as it remains on the web
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR »

Reading the text reports output from Cumulus it looks good. As @mcrossley remarks, the textfiles are apparently encoded UTF-8. I assume - because it works normally well - that a correct &deg; symbol would work.

It is apparently in the file wxnoaaclimatereports.php which includes include-noaa-reports.php. It seems to me, the last file does some filtering/transformation with the report generated by Cumulus[MX].

The last file contains many lines saying:

Code: Select all

$rpt = preg_replace('|°|Uis','&deg;',$rpt);
and in my humble opinion, somewhere there the problematic character is generated. The display of NOAA reports is created by Ken True with help from Beteljuice for Cumulus.

So, my guess is @Beteljuice may have an answer - as to why the character is here before the &deg; - and if he does not, we better move the question to the SaratogaWX board. Point is the &deg; is correctly there and displayed, but in the process the weird extra character is added before it. Where and how to remove it is up to the programmer(s).
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Bad reading nooa monthly e yearly report

Post by mcrossley »

HansR wrote: Wed 20 Nov 2019 8:30 am As @mcrossley remarks, the textfiles are apparently encoded UTF-8.
The encoding is optionally UTF-8 - it is a configuration option in the NOAA settings, if that is not selected it will be the users default encoding, normally Windows-1250 on Windows.
Nevizio
Posts: 106
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: U.S.

Re: Bad reading nooa monthly e yearly report

Post by Nevizio »

Another strange thing is that you have to send these files via extra web files because using the interface setting
noaa setting does not take place.
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR »

mcrossley wrote: Wed 20 Nov 2019 9:41 am
HansR wrote: Wed 20 Nov 2019 8:30 am As @mcrossley remarks, the textfiles are apparently encoded UTF-8.
The encoding is optionally UTF-8 - it is a configuration option in the NOAA settings, if that is not selected it will be the users default encoding, normally Windows-1250 on Windows.
Aha, switched that off. Never realised that, completely missed it.
Will report back tomorrow.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR »

@Nevizio:
@mcrossley: indeed, Switch off UTF-8 encoding in the NOAA settings did it! :)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Post Reply