Page 1 of 2
NOAA-reports erroneous character *Fixed in 3035* However ??
Posted: Tue 24 Nov 2015 1:10 am
by Hunter362
There is an character in the NOAA-reports generated by MX in the very top left of monthly and yearly reports, (a period)
I never noticed until the other day, I've run MX from it's start but also still used 1.94 as well, that is what I was using for the reports.
That laptop's HD gave up the other day, so I switched all the files over to use MX thats when I noticed the character
See it here:
http://weather.cerchia.com/NOAA-reports ... 2015&mo=11
Steve, you fixed it in b-3035, however.. Now there is a "?" in place of the degree symbol.
Quick question, the Today's rain editor, I tried to use it yesterday, you can enter the desired amount but nothing changes?
Re: NOAA-reports erroneous character
Posted: Tue 24 Nov 2015 1:36 am
by malkie
I am not using the reports at present as I have not configured the web files to display them yet, but the reports are still being created. Here is the header of the October 15 report seen in a text editor:
*******************************************************************************
Monthly Climatological Summary for Oct 2015
Name: Elmnet City: Stevenage State: Hertfordshire
Elevation: 111 m Lat: N 51 53 45 Lon: W 000 10 25
Temperature (°C), Rain (in), Wind Speed (mph)
Heat Cool Avg
Mean Deg Deg Wind Dom
Day Temp High Time Low Time Days Days Rain Speed High Time Dir
----------------------------------------------------------------------------------
01 13.0 18.1 15:36 9.3 07:13 3.0 0.5 0.00 1.1 9.0 14:50 N
02 12.4 18.2 16:05 6.2 07:14 3.5 0.4 0.00 0.3 8.0 15:09 N
03 11.4 16.0 13:41 6.8 04:43 4.1 0.0 0.00 0.1 5.0 12:22 NNE
04 11.7 17.5 15:47 5.7 05:45 4.1 0.2 0.00 0.2 7.0 13:33 SSE
**********************************************************************************
No strange characters there it seems.
Re: NOAA-reports erroneous character
Posted: Tue 24 Nov 2015 2:56 am
by beteljuice
That looks like its being saved as UTF-8 WITH BOM instead of without ....
Re: NOAA-reports erroneous character
Posted: Tue 24 Nov 2015 9:03 am
by steve
It is saved as UTF-8 (i.e. with BOM) but that's exactly the same as Cumulus 1 does if the NOAA UTF-8 option is set. If the UTF-8 option is not set in MX, it using the default encoding, which according to the .Net documentation is ANSI. The problem is that with Mono, it seems that the default encoding is UTF-8.
I'll see if I can find a way to force it to use ANSI if the UTF-8 option is unset. Unless you have non-ANSI characters in your report, the result is the same anyway, with the exception of the BOM characters, which don't usually cause a problem, but clearly they do here for some reason. I could change it to not use a BOM for UTF-8 as well, if that would help, and wouldn't cause any problems elsewhere (I can't think how it would myself).
Re: NOAA-reports erroneous character
Posted: Tue 24 Nov 2015 9:26 am
by mcrossley
The 'usual' standard for UTF-8 is no BOM, and iirc older versions of PHP also have issues with a BOM in UTF-8, converting it into a printable character.
Re: NOAA-reports erroneous character
Posted: Tue 24 Nov 2015 9:33 am
by steve
OK, thanks, I'll change it. It's what it does for everything else anyway. I've also found the setting to force ANSI rather than expecting 'default' to do the right thing.
Re: NOAA-reports erroneous character
Posted: Wed 25 Nov 2015 11:02 pm
by Hunter362
[quote="steve"]It is saved as UTF-8 (i.e. with BOM) but that's exactly the same as Cumulus 1 does if the NOAA UTF-8 option is set. If the UTF-8 option is not set in MX, it using the default encoding, which according to the .Net documentation is ANSI. The problem is that with Mono, it seems that the default encoding is UTF-8.
Yes, I did not have UTF-8 encoding checked, I did check it the other day, but made no difference, the "period" was still there.
Using mono 3.0 under Ubuntu 14.04
Re: NOAA-reports erroneous character
Posted: Thu 03 Dec 2015 10:03 pm
by Hunter362
steve wrote:OK, thanks, I'll change it. It's what it does for everything else anyway. I've also found the setting to force ANSI rather than expecting 'default' to do the right thing.
Steve, you fixed it in b-3035, however.. Now there is a "?" in place of the degree symbol.
Quick question, the Today's rain editor, I tried to use it yesterday, you can enter the desired amount but nothing changes?
Re: NOAA-reports erroneous character
Posted: Fri 04 Dec 2015 10:04 am
by steve
Hunter362 wrote:Steve, you fixed it in b-3035, however.. Now there is a "?" in place of the degree symbol.
Yes, I see that myself. Do you have utf-8 selected? I don't but I've just selected it now. It might correct it. I'll see if I can work out why the ASCII version doesn't work properly. Character encoding is a pain.
Quick question, the Today's rain editor, I tried to use it yesterday, you can enter the desired amount but nothing changes?
When you say "nothing changes", do you mean on the rain edit screen or on the MX dashboard etc, or both? It works fine for me, and I've tried it with mm and inches.
Re: NOAA-reports erroneous character
Posted: Fri 04 Dec 2015 10:18 am
by mcrossley
Hunter362 wrote:Steve, you fixed it in b-3035, however.. Now there is a "?" in place of the degree symbol.
I had a look at your classic site, you are not specifying an encoding in the HTML or the server response header, so modern browsers will default to reading it as UTF-8 encoded, so you should UTF-8 encode the NOAA reports too - or add an encoding header to the page to tell the browser it is ANSI/Windows encoded.
Re: NOAA-reports erroneous character *Fixed in 3035* Howeve
Posted: Fri 04 Dec 2015 10:48 am
by steve
I think the reason the degree symbol appears as a question mark when utf-8 isn't selected is that I am now using a strict ASCII encoding, which is 7-bit, and the degree symbol is not part of that character set. I think that possibly I should be using ISO-8859-1 rather than ASCII. Selecting utf-8 is probably the best way to go, though, as suggested.
Re: NOAA-reports erroneous character
Posted: Sat 05 Dec 2015 2:12 am
by Hunter362
steve wrote:Hunter362 wrote:Steve, you fixed it in b-3035, however.. Now there is a "?" in place of the degree symbol.
Yes, I see that myself. Do you have utf-8 selected? I don't but I've just selected it now. It might correct it. I'll see if I can work out why the ASCII version doesn't work properly. Character encoding is a pain.
No I didn't have that checked, just did and I'll see what it does tonight.
Mark, in a later post mentioned default encoding for the page, this is what I have in the header.
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
No idea, that's what I have/had in the header of 1.94
All that encoding and stuff is up your's and Mark's alley
Quick question, the Today's rain editor, I tried to use it yesterday, you can enter the desired amount but nothing changes?
When you say "nothing changes", do you mean on the rain edit screen or on the MX dashboard etc, or both? It works fine for me, and I've tried it with mm and inches.
No, the editor screen, I can use the up/down arrows to change the desired amount ok, click apply and Dashboard stays the same, Today.ini stays the same as well.
Should any of the other fields fill in? Current counter, Start of day, multiplier ? They stay blank and can't be changed.
Re: NOAA-reports erroneous character *Fixed in 3035* Howeve
Posted: Sat 05 Dec 2015 2:23 am
by PaulMy
I don't have my MX up at the moment so can't check, but if I recall correctly there were some changes that require a restart for the .ini changes to take effect.
Paul
Re: NOAA-reports erroneous character
Posted: Sat 05 Dec 2015 4:50 pm
by steve
Hunter362 wrote:No, the editor screen, I can use the up/down arrows to change the desired amount ok, click apply and Dashboard stays the same, Today.ini stays the same as well.
today.ini won't get written until the next log file update, but the change should register straight away on the dashboard. After you've clicked 'Apply' the start of day rain counter should get updated to reflect the change you've done to today's rain.
Should any of the other fields fill in? Current counter, Start of day, multiplier ? They stay blank and can't be changed.
Yes, they should all have figures in them initially to reflect the state before you update today's total., something like this:
2015-12-05 16_47_57-Cumulus MX.png
If they're not showing figures initially, then something is going wrong before you even try to edit the figure. Are there any errors in the diags file at the time that you open the edit screen? And any errors in your browser's F12 console?
Re: NOAA-reports erroneous character
Posted: Sat 05 Dec 2015 6:42 pm
by Hunter362
steve wrote:Hunter362 wrote:No, the editor screen, I can use the up/down arrows to change the desired amount ok, click apply and Dashboard stays the same, Today.ini stays the same as well.
today.ini won't get written until the next log file update, but the change should register straight away on the dashboard. After you've clicked 'Apply' the start of day rain counter should get updated to reflect the change you've done to today's rain.
Should any of the other fields fill in? Current counter, Start of day, multiplier ? They stay blank and can't be changed.
Yes, they should all have figures in them initially to reflect the state before you update today's total., something like this:
2015-12-05 16_47_57-Cumulus MX.png
If they're not showing figures initially, then something is going wrong before you even try to edit the figure. Are there any errors in the diags file at the time that you open the edit screen? And any errors in your browser's F12 console?
Here's what mine looks like.
CumulusMX_2015-12-05.png
When I mouse over the grey boxs, the cursor turns to a circle with a / through it.
No errors appear in the diags file, as for the F12 console, not really sure what to look for