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 4019) - 03 April 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

PHP Web 'viewer' for Cumulus NOAA Style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

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

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley »

Ah, I did this a while ago, and just looking at my reports page now, I see that I made some other changes as well :? :bash:

I made the page HTML5, and also changed the page code-page from UTF-8 (HTML default) to Windows-1252

Code: Select all

<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
So the .htaccess on its own may not work.
Last edited by mcrossley on Thu 23 May 2013 2:14 pm, edited 1 time in total.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

pernaczy wrote: So, You may consider to include such a possibility to a future (not very distant future :D ) enhancement of the Cumulus PLEASE.
Does Mark's suggestion not work for you?
Steve
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

steve wrote:Does Mark's suggestion not work for you?
No it doesn't work.
I've tried several combinations and the only one that works is:
- the charset is set to UTF-8
- Cumulus otput (NOAA report) file is in UTF-8 format.
You can see it here: http://www.pogoda-niesiolowice.kaszuby. ... hp?yr=2012 (I purposely put there some other characters from my national language - ś ć ę ż ź ń- you can see them at the right-top of the report):

BTW. This problem (output format of the Cumulus) is related also to the e.g forecast generated by Cumulus. It uses words from "strings.ini" file. They are processed and being sent to web server (in ANSI format I think). So when "strange" (e.g my national) characters are used in the "strings.ini" file you see "black diamonds" in the forecast text too. Probably if the output of the forecast were in UTF-8 format it would have solved this problem too.
Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
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: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

Piotr - you have several </head></body> in your page.
ATM things look alright to me :roll:

Try to get the spurious tags out of your page.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

I've uploaded a new beta build of 1.9.4 with an option to save the reports using UTF-8 encoding.

https://cumulus.hosiene.co.uk/viewtopic.php?f=2&t=9433
Steve
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

beteljuice wrote:Piotr - you have several </head></body> in your page.
ATM things look alright to me :roll:

Try to get the spurious tags out of your page.
I did it. Thanks for your comments. I'm not an expert in html and php so, it must take time untill i can clean my pages up (I'm still trying to learn).
Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

steve wrote:I've uploaded a new beta build of 1.9.4 with an option to save the reports using UTF-8 encoding.

https://cumulus.hosiene.co.uk/viewtopic.php?f=2&t=9433
Thank you very much Steve. You are quick and helpful as usual. I have installed this new version, changed the NOAA report save format and let's hope that this will "save my life". Unfortunately I have to wait until tomorrow. :(
Is there any hope for "forecast words" format change? :oops:

Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

pernaczy wrote:Is there any hope for "forecast words" format change?
That would need the code which saves the processed web pages to change, and I don't think there is the same option with the code that does that, so I would probably have to rewrite a few sections of code. But I'll look into it; as I understand it, web pages are supposed to be UTF-8 now anyway?
Steve
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

steve wrote:as I understand it, web pages are supposed to be UTF-8 now anyway?
I'm not an expert, but I think that UTF-8 is (probably) the most convenient format for many "strange" languages (as mine is).

Going back to NOAA reports. The modification you have done to the latest version of CUMULUS (NOAA reports can be saved in UTF-8 format) doesn't work. I set up this option yesterday and unfortunately both "todays" files (NOAAYR2013.txt and NOAAMO0513.txt) have been saved in ANSI format. You can check it on my web page. Only those two have "black diamonds". All other reports I saved manually yesterday in UTF-8 format.

Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

pernaczy wrote:Going back to NOAA reports. The modification you have done to the latest version of CUMULUS (NOAA reports can be saved in UTF-8 format) doesn't work. I set up this option yesterday and unfortunately both "todays" files (NOAAYR2013.txt and NOAAMO0513.txt) have been saved in ANSI format.
That's impossible! I tested it and it works! :lol:

But actually, I only tested the 'manual' saving, I forgot that the automatic saving is separate code :oops:

I'll change the other code and upload a new build later today.
Steve
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley »

steve wrote:as I understand it, web pages are supposed to be UTF-8 now anyway?
Well, UTF-8 is now the default for HTML5 and will cover virtually all use cases, for other HTML/XHMTL standards it is still a minefield.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

mcrossley wrote:Well, UTF-8 is now the default for HTML5 and will cover virtually all use cases, for other HTML/XHMTL standards it is still a minefield.
So I could change the standard Cumulus web pages to HTML5, and change the encoding to UTF-8, but if I change the encoding (without it being optional) for 'extra' files (and where people had replaced the standard files with others), that may cause people problems?
Steve
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

Auto-save now also changed, in build 1078, just uploaded.
Steve
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

Once more: THANK YOU Steve. It works. :D

Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
kingqueen
Posts: 60
Joined: Tue 26 Feb 2013 6:52 pm
Weather Station: Maplin N96GY / Fine Offset 1081
Operating System: Windows 7 HP 64 bit
Location: Wetherby, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by kingqueen »

steve wrote:I've uploaded a new beta build of 1.9.4 with an option to save the reports using UTF-8 encoding.
I think you're great.
Image
Post Reply