Page 1 of 1

Degree Symbol ° in a .mail template

Posted: Tue Sep 04, 2018 8:48 am
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?

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 12:37 am
by admin
Never tried this. Does a wrong character show up or what is the result looking like?

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 12:52 am
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

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 8:15 am
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 2712 times

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 11:28 am
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 2705 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?

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 12:26 pm
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

Re: Degree Symbol ° in a .mail template

Posted: Wed Sep 05, 2018 1:08 pm
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.

Re: Degree Symbol ° in a .mail template

Posted: Thu Sep 06, 2018 5:04 pm
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.