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 4018) - 28 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

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.

Bad reading nooa monthly e yearly report

Post by Nevizio »

Hi, everyone,i see the noaa monthly and yearly report that show stranger simbol next to C°(indicated by the red arrow) maybe i can correct but how? :?:
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12697
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 »

How are you viewing them?

It is a difference in character encoding schemes between the file and viewer.
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 »

this is the files report that cumulus mx show in reports interface and in the remote file on te my web site,how can modificate? :roll: :?:
User avatar
mcrossley
Posts: 12697
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 »

I'd need to see your web page to advise, you need to post a link.

How have you configured MX to save the report - using UTF-8 encoding or not?
User avatar
HansR
Posts: 5874
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: Actually, it may be a bit different, funny thing is, I checked it myself this morning and was wondering what had happened. It is originally coded as on the page as: 'weird char' °C. I think it has originally been a two byte char where the intention was to do it correctly with a ° But the weird char remained and the °seems to have been placed in between. If you look at the source of the page you will see this. I am not sure where the reports are generated. I have a different layout but the char is there as well.
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: 12697
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: Thu 07 Nov 2019 10:09 am where the intention was to do it correctly with a °
The NOAA file should not use HTML encoding, this is a plain text file.

If you have an encoding mismatch between the NOAA file contents and a HTML page you display it in then you will get these odd characters - it is not a corruption in the file itself. Open the file in a text editor and it will display correctly because it will adapt its encoding based on what it finds in the file.

The MX Admin interface uses HTML5 and UTF-8 encoding (the standard for HTML5), so if the NOAA reports are generated in ASCII encoding, you will see odd characters, there is not a lot I can do about that.
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 10:07 am I'd need to see your web page to advise, you need to post a link.

How have you configured MX to save the report - using UTF-8 encoding or not?
http://www.collineaprutinemeteodue.alte ... MO1119.txt
I use UTF-8 encoding but I send the NOOA files online with the extra web file interface because using the interface where you set the files nooa the same does not work for uploads (the reason I have not yet figured it out)
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 10:19 am
HansR wrote: Thu 07 Nov 2019 10:09 am where the intention was to do it correctly with a °
The NOAA file should not use HTML encoding, this is a plain text file.

If you have an encoding mismatch between the NOAA file contents and a HTML page you display it in then you will get these odd characters - it is not a corruption in the file itself. Open the file in a text editor and it will display correctly because it will adapt its encoding based on what it finds in the file.

The MX Admin interface uses HTML5 and UTF-8 encoding (the standard for HTML5), so if the NOAA reports are generated in ASCII encoding, you will see odd characters, there is not a lot I can do about that.
No wait I did it already, I opened the file with windows 10 notepad but the strange character is there, I was about to delete it manually but then I stopped because I thought I would do damage .... :?
User avatar
mcrossley
Posts: 12697
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 »

Please zip up the files and attach them here so I can examine the encoding being used.
User avatar
mcrossley
Posts: 12697
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 »

Nevizio wrote: Thu 07 Nov 2019 10:30 am I use UTF-8 encoding but I send the NOOA files online with the extra web file interface because using the interface where you set the files nooa the same does not work for uploads (the reason I have not yet figured it out)
I'm wondering if the FTP process is corrupting the files, try ticking the "binary" option in the extra files configuration.
Some FTP servers can corrupt UTF-8 when doing "Text" transfers - they only use basic ASCII encoding.
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:00 am Please zip up the files and attach them here so I can examine the encoding being used.
You do not have the required permissions to view the files attached to this post.
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:04 am
Nevizio wrote: Thu 07 Nov 2019 10:30 am I use UTF-8 encoding but I send the NOOA files online with the extra web file interface because using the interface where you set the files nooa the same does not work for uploads (the reason I have not yet figured it out)
I'm wondering if the FTP process is corrupting the files, try ticking the "binary" option in the extra files configuration.
Some FTP servers can corrupt UTF-8 when doing "Text" transfers - they only use basic ASCII encoding.
Ok I Try ;)
Thank you.
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 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?
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12697
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 »

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.
User avatar
HansR
Posts: 5874
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: Thu 07 Nov 2019 10:19 am
HansR wrote: Thu 07 Nov 2019 10:09 am where the intention was to do it correctly with a °
The NOAA file should not use HTML encoding, this is a plain text file.

If you have an encoding mismatch between the NOAA file contents and a HTML page you display it in then you will get these odd characters - it is not a corruption in the file itself. Open the file in a text editor and it will display correctly because it will adapt its encoding based on what it finds in the file.

The MX Admin interface uses HTML5 and UTF-8 encoding (the standard for HTML5), so if the NOAA reports are generated in ASCII encoding, you will see odd characters, there is not a lot I can do about that.
It probably is not a CMX problem but a web template issue.
I just checked where it comes from - I use the Saratoga template myself - and the part of the code that displays the report is a bit upgraded by beteljuice. He entered the following code on three places :

Code: Select all

$rpt = preg_replace('|<|Uis','&lt;',$rpt);
$rpt = preg_replace('|>|Uis','&gt;',$rpt);
$rpt = preg_replace('|°|Uis','&deg;',$rpt);
echo $rpt;
So the original txt file (no HTML) is reformatted to straight forward HTML (within a <pre> tag).

I think beteljuice must take a look at it.
Hans

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