Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.1.2 build 3055 - 4 November 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

Bad reading nooa monthly e yearly report

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

Nevizio
Posts: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 12:12 am

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: 5733
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » Thu 07 Nov 2019 9:02 am

How are you viewing them?

It is a difference in character encoding schemes between the file and viewer.

Nevizio
Posts: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 10:03 am

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: 5733
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » 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?

User avatar
HansR
Posts: 344
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 9 (stretch)
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR » Thu 07 Nov 2019 10:09 am

@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.
https://meteo-wagenborgen.nl / Cumulus MX 3.1.0-b3053
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / Linux 4.19.75-v7+ armv7l
Mono JIT compiler version 6.4.0.198 (tarball Tue Sep 24 01:45:47 UTC 2019)

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

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » 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.

Nevizio
Posts: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 10:30 am

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: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 10:33 am

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: 5733
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » Thu 07 Nov 2019 11:00 am

Please zip up the files and attach them here so I can examine the encoding being used.

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

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » 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.

Nevizio
Posts: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 11:22 am

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: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » Thu 07 Nov 2019 11:24 am

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: 58
Joined: Wed 10 Feb 2016 8:43 pm
Weather Station: Oregon Scientific wmr-200
Operating System: Windows 10 - Android
Location: Italy

Re: Bad reading nooa monthly e yearly report

Post by Nevizio » 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?
You do not have the required permissions to view the files attached to this post.

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

Re: Bad reading nooa monthly e yearly report

Post by mcrossley » 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.

User avatar
HansR
Posts: 344
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 9 (stretch)
Location: Wagenborgen (NL)
Contact:

Re: Bad reading nooa monthly e yearly report

Post by HansR » Thu 07 Nov 2019 12:20 pm

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.
https://meteo-wagenborgen.nl / Cumulus MX 3.1.0-b3053
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / Linux 4.19.75-v7+ armv7l
Mono JIT compiler version 6.4.0.198 (tarball Tue Sep 24 01:45:47 UTC 2019)

Post Reply