Degree Symbol ° in a .mail template

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1392
Joined: Mon Sep 22, 2014 3:24 am

Degree Symbol ° in a .mail template

Post by Mattk »

Have no issues with the Deg Symbol ° in any other template except a .mail template, is it possible? If so what is the trick?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Degree Symbol ° in a .mail template

Post by admin »

Never tried this. Does a wrong character show up or what is the result looking like?
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1392
Joined: Mon Sep 22, 2014 3:24 am

Re: Degree Symbol ° in a .mail template

Post by Mattk »

I've tried cutting/pasting the symbol from several sources n the template as well as directly inserting (ALT 0176 etc) which looks good in the template but when run typically produces a blank. Also tried a few different text/ascii formats (DOS, Unicode etc)
This template portion

Outside (Virtual) Temperature
#if#{*[th0temp-act.0:-9999]!=-9999*}#then#Current: [th0temp-act.1:]°C#else##fi#

Produces this email output

Outside (Virtual) Temperature
Current: 19.6 C
weeramateur
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Tue Oct 04, 2016 9:09 am

Re: Degree Symbol ° in a .mail template

Post by weeramateur »

by me is it possitble with html:
2018-09-05 08_03_45-De dagweergegevens van Hardinxveld-Giessendam van 04-09-18 om 23_30 uur. Volgens.png
2018-09-05 08_03_45-De dagweergegevens van Hardinxveld-Giessendam van 04-09-18 om 23_30 uur. Volgens.png (12.01 KiB) Viewed 2707 times
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Degree Symbol ° in a .mail template

Post by admin »

I tried with a Meteobridge PRO as shown below:

Screen Shot 2018-09-05 at 11.26.16.png
Screen Shot 2018-09-05 at 11.26.16.png (28.41 KiB) Viewed 2700 times

this results into the following mail showing up in my mailbox and the message is shown fine as "13°C". Below you see a transcript of the raw mail data coming in.

Code: Select all

Return-Path: <info@meteobridge.com>
X-Original-To: boris@pasternak
Delivered-To: boris@pasternak
Received: from ssl.congenio.de (ssl.congenio.de [138.201.30.145])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "congenio.de", Issuer "Let's Encrypt Authority X3" (not verified))
	by mars.pasternak (Postfix) with ESMTPSA id 3B55FA80D05
	for <boris@pasternak>; Wed,  5 Sep 2018 11:25:25 +0200 (CEST)
Received: from localhost (port-55404.pppoe.wtnet.de [134.101.219.222])
	(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by ssl.congenio.de (Postfix) with ESMTPSA id E36DC760361
	for <info@smartbedded.com>; Wed,  5 Sep 2018 11:25:24 +0200 (CEST)
date: Wed, 05 Sep 2018 11:25:12 +0200
to: info@smartbedded.com
from: info@meteobridge.com
subject: test
Content-Type: text/plain; charset=utf-8

13°C
Data is sent as UTF8. May be you mail client is expecting something else?
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1392
Joined: Mon Sep 22, 2014 3:24 am

Re: Degree Symbol ° in a .mail template

Post by Mattk »

Yes I can duplicate that one and also have no problem with HTML.

It's when the ° symbol is contained within a .mail template and Select Predefined Content for Email from the drop down is used to select the template
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1392
Joined: Mon Sep 22, 2014 3:24 am

Re: Degree Symbol ° in a .mail template

Post by Mattk »

I would say it's probably something to do with the mail system and/or text/format types? In Outlook when extra line breaks are removed, the ° symbol comes up blank, when the line breaks are restored the ° symbol shows as a ? inside a black diamond, the same mail in Webmail the ° symbol shows as a little square box.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Degree Symbol ° in a .mail template

Post by admin »

OK, I will test with the mail template (just did on the command line on first time) when being back home on sunday.
Post Reply