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 4018) - 28 March 2024

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 drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Problem with degrees symbol

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Problem with degrees symbol

Post by Mapantz »

Hi there!

After all the kerfuffle about Wunderground stopping the free API, I suddenly realised IPTimelapse uses it to show the weather data. I then discovered on another forum, that IPTimelapse can read a text file for the weather data. So, I have set up a text file called ipcamT.txt and get CMX to process a few webtags and turn it in to ipcam.txt, IPTimelapse reads that text file. The problem I have is the degrees symbol, If I use either °or <#tempunit> then Cumulus turns it either to 15.8�C or 15.8À°C or 15.8&#176;C

I have tried saving in ANSI and UTF-8, but it still won't show a simple °C

What am I doing wrong?

Edit: I have just been doing some experimenting.. I stopped Cumulus from processing the file, then opened the file in notepad and saved it as UTF-8. As soon as IPTimelapse read the file, it correctly showed the degrees symbol without any extra weird characters. I checked 'UTF8' in Cumulus and restarted the file processing and it added in the weird characters again. I'm wondering if CMX is actually using UTF8 at all?
Image
ExperiMentor
Posts: 214
Joined: Tue 24 Nov 2015 11:30 pm
Weather Station: Fine Offset & Davis Vantage Vue
Operating System: Windows 10; Raspbian Buster
Location: Switzerland

Re: Problem with degrees symbol

Post by ExperiMentor »

I have 2 answers for you.

First, Unicode has 2 symbols, see https://en.wikipedia.org/wiki/Celsius . There is either a code for the little circle degree symbol that you put a C after, or there is a different code that combines the degree and C into a single character. Have you tried both?

Second, correct usage (though little known) is that the degree symbol should not be used. You are supposed to just write "19.7 C" and that nicely avoids all your troubles! I think Cumulus' <#tempunit> just gives you the C or F for that reason?
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem with degrees symbol

Post by steve »

You may need to restart MX to get the 'utf=8' setting to take effect.
Steve
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem with degrees symbol

Post by Mapantz »

ExperiMentor wrote: Second, correct usage (though little known) is that the degree symbol should not be used. You are supposed to just write "19.7 C" and that nicely avoids all your troubles! I think Cumulus' <#tempunit> just gives you the C or F for that reason?
I'm old school. I like to show °C

<#tempunit> shows °C <#tempunitnodeg> shows C
steve wrote:You may need to restart MX to get the 'utf=8' setting to take effect.
Sadly, that didn't work Steve. I still get °C

I spoke to another user earlier, he is doing the same thing as me, but using Cumulus 1.9.4 build 1099, he has no problems with the encoding.
Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with degrees symbol

Post by mcrossley »

ExperiMentor wrote:Second, correct usage (though little known) is that the degree symbol should not be used. You are supposed to just write "19.7 C" and that nicely avoids all your troubles! I think Cumulus' <#tempunit> just gives you the C or F for that reason?
Can't agree with that ;)
It is "degrees Celsius" and should have a degree symbol (separated from the value by a space) - the same for Fahrenheit. The SI unit however is just "Kelvin" and that does not have a degree symbol.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem with degrees symbol

Post by steve »

I’m pretty sure the utf-8 processing works, because the standard templates use utf-8. Perhaps there’s a problem with utf-8 for extra files - assuming of course that your input file is OK.

When I next have my laptop out I’ll have a look. But note that &#176; as you quoted above is a valid HTML entity for a degree symbol and should be rendered correctly by a browser.
Steve
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem with degrees symbol

Post by Mapantz »

Hi Steve

I'm using the .txt file extension.
It is set to UTF-8 as well.
ipcamT.txt
You do not have the required permissions to view the files attached to this post.
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem with degrees symbol

Post by steve »

The file you attached doesn't use <#tempunit>, nor does it have a degree symbol in it. I edited it (in Notepad++) to use both of those:
2018-06-06 12_19_59-C__Users_steve_Downloads_ipcamT.txt - Notepad++.png
For me, MX substitutes &#176; for the degree symbol in the web tag (which is correct for a web site) and leaves the explicit degree symbol untouched:
2018-06-06 12_20_42-_C__Users_steve_Downloads_ipcam.txt - Notepad++.png
I don't know why it apparently doesn't work for you. I don't think the code has changed in this area in the version I'm using compared to build 3043. Note that MX creates the output file as UTF-8 without BOM, perhaps that's relevant.
You do not have the required permissions to view the files attached to this post.
Steve
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem with degrees symbol

Post by Mapantz »

Yeah sorry. I forgot to put back what I was trying to use as I removed it just to keep 'C'

That aside, using &#176; stays as &#176; in the output.

If I stop CMX from processing the file and manually put the degrees symbol in, it works fine, but as soon as CMX processes the file again, it adds °C to the output.

Processing stopped and manually put degrees symbol in output file:
2018-06-06 (4).png
Processing started again:
2018-06-06 (3).png
You do not have the required permissions to view the files attached to this post.
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem with degrees symbol

Post by steve »

Have you actually looked at the output file from Cumulus in Notepad++ (or another good text editor). Perhaps the problem is with whatever you are doing with it.
Steve
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem with degrees symbol

Post by Mapantz »

I'm doing nothing with the files. I have a simple ipcamT.txt which get's processed to ipcam.txt, and then the text get's read my the webcam software.

Both files show °C and both files are encoded with UTF-8 BOM (opened in NOTEPAD++)

If it was the webcam software, surely the degrees symbol wouldn't show when I manually add it to the text file? As it is the degrees symbol shows fine, so it seems like CMX doing something with it when it processes it. I can't think of anything else to be honest.
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: Problem with degrees symbol

Post by beteljuice »

Shouidn't it be UTF8 NO BOM ?
Image
......................Imagine, what you will KNOW tomorrow !
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem with degrees symbol

Post by Mapantz »

beteljuice wrote:Shouidn't it be UTF8 NO BOM ?
Tried UFT8 on it's own, with BOM and ANSI. All ideas have exhausted lol
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem with degrees symbol

Post by steve »

All I can tell you is that Cumulus is correctly encoding the degree symbol as the hex sequence C2 B0 (look at the output from Cumulus in a hex editor). That odd A symbol that you see is what you get when software incorrectly interprets the UTF-8 encoding as ANSI, so presumably that's what your webcam software is doing.

Perhaps your webcam software can't handle utf-8 files? If that's the case, then I think you're stuck, unless you can also turn off the 'use utf-8 for standard files' setting, because I seem to remember that due to some issue with a third party component, the utf-8 setting is either on or off for all files.
Steve
User avatar
ConligWX
Posts: 1571
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Problem with degrees symbol

Post by ConligWX »

no sure what to say really I created a template file for my webcam to use the °C symbol and then CumulsMX processes that for a txt file to be used with Imagiks "convert" utility.

the °C is handled by CumulsMX without any issue it doesnt get changed. here is my file and txt file unchanged.
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Locked