Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.6 (build 3082) - 1 June 2020 (please see important announcement regarding releases since 3.5.0)
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 the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

CumulusMX and Cumulus1 UI style Multilingual Websites

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
Post Reply
Dennisdg
Posts: 162
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 10 Pro
Location: Camberley
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Dennisdg »

Thanks - all sorted now.

Cheers
Dennis

Davis Vantage PRO2
Win 10 Pro

https://g4glp.co.uk

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

NOOOO!!

There is NO line 355 in noaareports.php
The line at 293 should be

Code: Select all

echo preg_replace(array('/\xC2/U','/\xB0/U'), array('°','°'),$rpt);
The Howto clearly indicates the formats that should be used for the NOAA reports and the settings to use in extra webfiles.

This was tested with BOTH CumulusMX AND Cumulus1

There WAS a longstanding bug which we (beteljuice & myself) fixed with the above line.

If you use the settings specified in the Howto then it will work.
If it does NOT work then it is probably because historically some non-default settings were used to generate the files.
The files can be fixed by loading them in notepad++ and changing the encoding to ANSI CR LF
as all the files in both C1 and MX are formatted this way when the default setting are used.

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

BCJKiwi wrote:
Thu 30 Apr 2020 10:10 pm
NOOOO!!

There is NO line 355 in noaareports.php
The line at 293 should be

Code: Select all

echo preg_replace(array('/\xC2/U','/\xB0/U'), array('°','°'),$rpt);
The Howto clearly indicates the formats that should be used for the NOAA reports and the settings to use in extra webfiles.

This was tested with BOTH CumulusMX AND Cumulus1

There WAS a longstanding bug which we (beteljuice & myself) fixed with the above line.
For Dennisdg, his settings were not as in your How To, but that is real life, if a choice of settings are available, people don't always stick to default. Changing one preg_replace line was quicker and easier for him than changing lots of NOAA reports. That was right advice for him.

My approach was helpful, successfully sorting out Dennisdg issue based on how he had his NOAA pages generated. Agreed, anyone following your instructions should not have UTF-8 files and should not do the change I suggested. I will edit my earlier post to stress it is only for MX users with UTF-8 files.

BCJKiwi wrote:
Thu 30 Apr 2020 10:10 pm
If you use the settings specified in the Howto then it will work.
If it does NOT work then it is probably because historically some non-default settings were used to generate the files.
The files can be fixed by loading them in notepad++ and changing the encoding to ANSI CR LF
as all the files in both C1 and MX are formatted this way when the default setting are used.
And that is the issue. While all your web pages choose to use UTF-8 (not ANSI), you want a file included in one web page to use ANSI because in Cumulus use of UTF-8 is not default option for NOAA or extra files.
UTF-8 has advantages over Unicode (the alternative format) because it supports a greater range of characters. Steve Loft after many years of considering it, implemented from build 1093 (27 April 2014) web pages using UTF-8 and option for other files to use UTF-8. He did not change the Cumulus default to Unicode, because he wanted consistency with his original package in January 2004. None the less, he did encourage people to change away from default, pointing out advantages of UTF-8.


Your How To instructions are excellent, and I hope anybody who is not technical follows them exactly and gets your wonderful package working. It is ideal for a beginner with no set up decisions taken in past. However, some people were generating NOAA reports before your excellent package came along, it is a bit unfair to expect them to edit existing files (I have I think about 150, certainly more than a decade worth of NOAA reports) to edit all of them to go back to defaults, just because for simplicity you have decided people must use defaults for your package.


I've already aired the point about assuming people use defaults when options are available with Hans re his package, and I have better things to do than continue to take part in any argument. You have been generous and given people choices about showing heat index, wind chill, storm rain, solar and many more. Give them a choice on Unicode/UTF-8 format for these reports. On the basis of that choice adjust your replace instruction; easier for everyone in future.
Last edited by sfws on Sat 02 May 2020 3:43 am, edited 1 time in total.

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

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by mcrossley »

BCJKiwi wrote:
Thu 30 Apr 2020 10:10 pm
The files can be fixed by loading them in notepad++ and changing the encoding to ANSI CR LF
as all the files in both C1 and MX are formatted this way when the default setting are used.
Not in MX, the line ending depends which on the OS that is running MX, for Windows it will be CRLF, for Linux (and I assume macOS) it will be LF.

And to be picky, MX uses ISO-8859-1 encoding by default not ANSI, though for the purposes of the NOAA reports they are equivalent as the reports do not contain any of the extra characters in the ANSI character set.

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

mcrossley wrote:
Fri 01 May 2020 9:13 am
Not in MX, the line ending depends which on the OS that is running MX, for Windows it will be CRLF, for Linux (and I assume macOS) it will be LF.
Yes, only Windows does double character for line ends. macOS like Linux is derived from the Unix I learnt almost half a century ago, well before Windows existed. Microsoft deliberately chose to do everything a different way to what was internationally accepted. Until a few years ago, as part of forcing people to use their products, there was deliberate incompatibility.
mcrossley wrote:
Fri 01 May 2020 9:13 am
And to be picky, MX uses ISO-8859-1 encoding by default not ANSI, though for the purposes of the NOAA reports they are equivalent as the reports do not contain any of the extra characters in the ANSI character set.
Thanks for mentioning it. I initially had typed ISO-8859-1 encoding in my post, but subsequently I returned to post and edited it out as I thought it was adding a complication step too far given the length of the rest of my argument! But I have edited it back in now although I am calling it Unicode rather than ISO-8859-1 because that is how Beteljuice references it, in the commented out replace instructions left in the "noaareports.php" script.
Last edited by sfws on Sat 02 May 2020 3:47 am, edited 1 time in total.

Dennisdg
Posts: 162
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 10 Pro
Location: Camberley
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Dennisdg »

For sfws, once again I am grateful for you suggested fix.

In the UIwebsiteMX Howto I had left unchanged Use UTF-8 encoding ‘tick’ from my previous CumulusMX settings. I have now un-ticked it.
It was not a deliberate choice to ignore default settings, an error on my part.

"For NOAA-reports
Use the CumulusMX User interface Settings / NOAA report settings option
Time format click on 24 Hour radio button
Monthly filename format 'NOAAMO'MMyy'.txt'
Yearly filename format 'NOAAYR'yyyy'.txt'
Use UTF-8 encoding DO NOT TICK
Autosave after daily reset tick
Auto FTP after auto save tick
FTP directory httpdocs/mxtest/NOAA-reports"

I have changed back line 293 to the original code. I assume the NOAA Reports will only reflect this change after the next daily upload.

BCJKiwi - "The Howto clearly indicates the formats that should be used for the NOAA reports and the settings to use in extra webfiles"
I do not have NOAA settings in extra webfiles, should I? If so what settings? I can’t find reference to them in the Howto do.

Thank you all for your help.
Dennis

Davis Vantage PRO2
Win 10 Pro

https://g4glp.co.uk

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

There is still misunderstanding about how you choose the encoding in which NOAA reports are generated.
Dennisdg wrote:
Fri 01 May 2020 3:31 pm
"For NOAA-reports
Use the CumulusMX User interface Settings / NOAA report settings option
Time format click on 24 Hour radio button
Monthly filename format 'NOAAMO'MMyy'.txt'
Yearly filename format 'NOAAYR'yyyy'.txt'
Use UTF-8 encoding DO NOT TICK
Autosave after daily reset tick
Auto FTP after auto save tick
FTP directory httpdocs/mxtest/NOAA-reports"

I have changed back line 293 to the original code. I assume the NOAA Reports will only reflect this change after the next daily upload.
This relates to how the FTP deals with the file. That is what BCJKiwi has written to help you fill out the Extra Files screen, it is not a guide to how you select the encoding for the NOAA reports.

Whether the report is generated in
mcrossley wrote:
Fri 01 May 2020 9:13 am
MX uses ISO-8859-1 encoding by default
or in UTF-8 is determined in a different setting:
NOAA.PNG
Please note this illustration does not show the default settings, it illustrates how they could be set, for purposes of customisation.
Dennisdg wrote:
Fri 01 May 2020 3:31 pm
In the UIwebsiteMX Howto I had left unchanged Use UTF-8 encoding ‘tick’ from my previous CumulusMX settings. I have now un-ticked it.
It was not a deliberate choice to ignore default settings, an error on my part.
Finally, what you select in UTF8 column on the extra files settings, is supposed to match the format of the file you are asking Cumulus to upload, so Denisdg, you have now created an error situation. You are now telling FTP to process your NOAA report file that is not in the encoding represented by unticked state.
You do not have the required permissions to view the files attached to this post.

Dennisdg
Posts: 162
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 10 Pro
Location: Camberley
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Dennisdg »

I currently don't have NOAA included in the Extra web files settings. NOAA files are being sent to the web but being displayed with double degrees.

Should I revert back to ticking the Use UTF-8 encoding and also include NOAA in Extra web files without UTF8 set?

My original NOAA report settings were the same as yours.
Dennis

Davis Vantage PRO2
Win 10 Pro

https://g4glp.co.uk

sutne
Posts: 67
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: Oregon Scientific WMR100
Operating System: Raspbian Buster
Location: Rjoanddalen, Voss, Norway

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sutne »

Multilingual is working everywhere except for the pop-up graphs on the gauges.
Any plans for those?

sutne
Posts: 67
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: Oregon Scientific WMR100
Operating System: Raspbian Buster
Location: Rjoanddalen, Voss, Norway

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sutne »

BCJKiwi wrote:
Thu 30 Apr 2020 8:09 am
It will be in the header so it is available on all pages.
I think it is logical to have the update date next to the update time; in the Time box AND the footer.

sutne
Posts: 67
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: Oregon Scientific WMR100
Operating System: Raspbian Buster
Location: Rjoanddalen, Voss, Norway

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sutne »

My site is up and running with the new UI:
http://www.rjoandveret.no/webfilesMX/index.php

There is one error in Records:
Everywhere the Lowest Maximum Temperature shows the same value.

Dennisdg
Posts: 162
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 10 Pro
Location: Camberley
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Dennisdg »

Your pop-up graphs on the gauges look good to me.
Dennis

Davis Vantage PRO2
Win 10 Pro

https://g4glp.co.uk

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

@ sutne

Yes Will review the source file and advise.

sutne
Posts: 67
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: Oregon Scientific WMR100
Operating System: Raspbian Buster
Location: Rjoanddalen, Voss, Norway

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sutne »

Dennisdg wrote:
Mon 04 May 2020 11:36 am
Your pop-up graphs on the gauges look good to me.
Yes, they look fine but the legend is in english when I change to other languages.

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

@ sutne
When I view your site the gauges pop up graph legends are in the language selected.

Post Reply