Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

NOAA Reports

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

freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: NOAA Reports

Post by freddie »

Looks like the path used. It should be:

Code: Select all

Reports
Not:

Code: Select all

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

Re: NOAA Reports

Post by mcrossley »

OK, I have a bit more information about this now.

The report option for UTF8 works for the local files, they are saved as either UTF-8 or ISO-8859-1.

However, the PHP upload always creates remote files with UTF-8 encoding.

I've fixed this with changes both to CMX to pass an encoding flag to the Upload.php script, and a change to the upload.php script to then save the files according to the encoding flag. In-flight between CMX and PHP all text is encoded as UTF-8.

FTP and SFTP are unaffected.
qisdtech
Posts: 9
Joined: Sun 28 Aug 2022 5:53 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 2025 Server

Re: NOAA Reports

Post by qisdtech »

freddie wrote: Fri 17 Mar 2023 3:16 pm Looks like the path used. It should be:

Code: Select all

Reports
Not:

Code: Select all

/Reports
Thanks Freddie. I've made this correction and we'll see how it goes tonight.
qisdtech
Posts: 9
Joined: Sun 28 Aug 2022 5:53 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 2025 Server

Re: NOAA Reports

Post by qisdtech »

All seems to be uploading at end of day now using PHP. Thanks again Freddie!
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: NOAA Reports

Post by ConligWX »

not sure if this helps, but your noaa_climate.php on your original page shows:

Code: Select all

// NASTY work-around, the ONLY way I find black diamond question mark (or deg character)
   $checkIt = explode("(", $rpt);
   $dodgy = substr($checkIt[1],0 , 1);
// the ONLY way I can replace when black diamond (unconditionally) to &deg
   $rpt = str_replace($dodgy,'°',$rpt);
// END nasty work around
   echo "<pre>\n";
   $rpt = preg_replace('/State: Dorset/i', 'County: Dorset   Country: UK', $rpt, 1);
   echo preg_replace('|<|Uis','&lt;',$rpt);
   echo "</pre>\n";
I know the original include-NOAA-reports.php that Ken True provided gave me issues too. Ken gave me a workaround like so:

So, there's two ways to do this:
1) (easy) force the wxnoaareports.php page to use UTF-8.
Just add
Code: [Select]
$useUTF8 = true;
before the include("top.php");
and the page will display in UTF-8.

2) (a bit harder) change include-NOAA-reports.php
Code: [Select]
$rpt = preg_replace('|°|Uis','&deg;',$rpt);
echo $rpt;
to

Code: [Select]
// $rpt = preg_replace('|°|Uis','&deg;',$rpt);
$rpt = iconv('UTF-8',$SITE['charset'].'//TRANSLIT',$rpt);
echo $rpt;
and that should convert the degree sign for you.
only the second solution worked for me for my Saratoga Templates, yet on my CumulusMX templates they just work, and use the same NOAA report files!

I'm not sure if you can get your code to work with Kens fix as beteljuice hacked your noaa_climate.php to make it work. however ALL my NOAA txt files are UTF-8 encoded.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: NOAA Reports

Post by HansR »

Sometimes I wonder if anybody understands the use of the encoding.
If a document is encoded UTF8 (as all CMX documents are afaik) then simply make your site UTF8 (which is the sensible thing to do these days)
I really do not understand why anybody would use a ISO-8859-x encoding when displaying UTF8 docs (or the other way around).
:groan:

[EDIT:]It seems to be possible and happening that a server ignores the UTF-8 encoding and serves the end user with another encoding. I'll ignore that. Just get another server, we do not need more confusion. I have never seen this btw.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: NOAA Reports

Post by Mapantz »

All I can tell you is, I have never touched my NOAA reports since I started using CMX back in 2016. They've always displayed correctly on my website. As I mentioned earlier in the thread, manually uploading them via FTP and using CMX''s FTP has never been an issue, until I swapped over to PHP upload.

All academic now, as Mark has identified the issue.
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: NOAA Reports

Post by HansR »

On the risk of increasing the confusion I would like to mention that I just had a communication with a user who does run CMX 3.24, does NOT use upload.php but does nonetheless conclude that CMX does no longer create its files in UTF8 (but is not good enough in English according to himself).

My conclusion (as it was before) is that the issue has nothing to do with upload.php (or PHP as a whole) but lies somewhere else.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: NOAA Reports

Post by Mapantz »

HansR wrote: Sun 19 Mar 2023 2:52 pm
My conclusion (as it was before) is that the issue has nothing to do with upload.php (or PHP as a whole) but lies somewhere else.
If I turn off PHP uploads and go back to FTP, it works fine.
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: NOAA Reports

Post by HansR »

Mapantz wrote: Sun 19 Mar 2023 4:29 pm
HansR wrote: Sun 19 Mar 2023 2:52 pm
My conclusion (as it was before) is that the issue has nothing to do with upload.php (or PHP as a whole) but lies somewhere else.
If I turn off PHP uploads and go back to FTP, it works fine.
If i turn on php upload i don't have the non-utf8 reports.
So what do you prove with your remark?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: NOAA Reports

Post by Mapantz »

HansR wrote: Sun 19 Mar 2023 5:01 pm
Mapantz wrote: Sun 19 Mar 2023 4:29 pm
HansR wrote: Sun 19 Mar 2023 2:52 pm
My conclusion (as it was before) is that the issue has nothing to do with upload.php (or PHP as a whole) but lies somewhere else.
If I turn off PHP uploads and go back to FTP, it works fine.
If i turn on php upload i don't have the non-utf8 reports.
So what do you prove with your remark?
I already answered that, twice. For a third time, no UTF8 issues with FTP. Issues with UTF8 when using PHP upload.
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: NOAA Reports

Post by HansR »

Mapantz wrote: Sun 19 Mar 2023 5:21 pm I already answered that, twice. For a third time, no UTF8 issues with FTP. Issues with UTF8 when using PHP upload.
And I claim two cases which contradict your statement:
  1. @Mapantz: PHP upload, issues with UTF8
  2. @Meteo19: FTP upload, issues with UTF8
  3. @HansR: PHP upload, no issues with UTF8
@Mapantz: you have no case with PHP upload except that there is an issue with UTF8.
And I agree that the issue apparently is misty, but I am not convinced, actually I don't agree, that is related to PHP upload. It can be related to PHP though: @meteo19 had to modify his (PHP) sites (I translate from French):
For the new version of CMX nice progress but it forced me to review each of my pages because the months with accents like February August December were all distorted I have the impression that MX no longer transmits in UTF 8.
(Note that he uses FTP).

Ignoring this will give some pain for future release as the issue is not solved to (all) the observations.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: NOAA Reports

Post by Mapantz »

I posted this topic because I have a problem. If you don't have any issues, then don't argue with me. Thanks.
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: NOAA Reports

Post by HansR »

But meteo19, a user of CUtils, does have a problem which is the inverse of yours. And that makes it partly my problem because when we meddle with an issue which looks different from two sides, a fix solves probably nothing but only makes things more complex.
Mapantz wrote: Sun 19 Mar 2023 6:10 pm If you don't have any issues, then don't argue with me. Thanks.
I am not arguing with you, Thanks. I am arguing the issue is not what it seems by some and that means that the solution brought by Mark will most likely not solve it. I argue for the community, the tool, CMX. Thanks for understanding. Thanks.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: NOAA Reports

Post by Mapantz »

Mark has already said he solved it, read further up. :groan:

Fed up with your patronising and argumentative replies. You're going on ignore.
Image
Post Reply