Jump to content

Degree Symbol in Notifications


wrj0

Recommended Posts

Posted

Hi All, and Happy New Year!

 

I'm looking for advice on how to correct a display problem with the degree symbol in custom email notifications. The following custom notification correctly displays the degree symbol on both windows email client and iPhone prowl push:

Body:

WC Temp1 = ${var.2.33}°

° (Courier 0xB0)

° Times New Roman (U+00B0)

 

However, when the body includes a Climate Module Temperature variable, the received message displays other symbols, as follows.

Body:

WC Temp1 = ${var.2.33}°

° (Courier 0xB0)

° Times New Roman (U+00B0)

Wx Out Temp = ${mod.weather.temp.current}

 

The above body content returns this in the windows email client:

WC Temp1 = 92°

° (Courier 0xB0)

° Times New Roman (U+00B0)

Wx Out Temp = 42.1 �F

 

...and the below image on the iPhone Prowl app. When the variable ${mod.weather.temp.current} is omitted, the degree symbol displays fine on all devices. Two different fonts have been included for the degree symbol for testing. The Body is in Text format, but HTML returns the same result.

 

What should I do to eliminate the undesired symbol presented in place of the degree symbol when a Climate Module variable is included with other variables in the notification? Thanks.

post-889-140474162209_thumb.png

Posted

Hello wrj0,

 

Thanks so very much for the feedback. Unfortunately this seems to be what ISY is adding incorrectly assuming the output is html (°). This is something we will need to fix but the problem is that it's buried deep in the code and intermingled with a lot of other formatting stuff. I have already reported it as a bug (#130).

 

In the meantime, you might want to try changing the content type to HTML in which case both devices "must" convert the symbol properly.

 

With kind regards,

Michel

Posted

Thanks for your reply, Michel.

Do you *ever* take a day off?

 

It appears that both HTML and Text content type return similar results with the à character, at least in my tests.

 

Thanks for noting this has been logged for a possible fix in a future release. It's not really a big deal, as two separate notifications can be sent that eliminates the undesired symbol.

 

Here's wishing you and the staff of UDI a very successful 2014!

Posted

Hello wrj0,

 

I do not think the recipient is processing HTML because it must work!

 

Would you be kind enough to save the contents in an html file as described here:

http://wiki.universal-devices.com/index ... e_Creation

 

Let me know if you are still getting the strange characters. If you are not, please try the following as the content-type:

text/html

 

Happy New Year to you as well.

 

With kind regards,

Michel

Posted

Thanks, again, Michel.

I tried following your instructions with the results below - still getting the strange characters.

 

Created new custom email notification “Char Test†with HTML option selected:

Subject: @webpage:@append:myDir/testlog.htm Test4

Body:

WC Temp1 = ${var.2.33}°

 

Wx Out Temp = ${mod.weather.temp.current}

 

 

Program:

Send Notification to ‘wrj email’ content ‘Char Test’

 

When Run Then is selected, the resulting email content is:

Subject: Test4

Body:

WC Temp1 = 90°

Wx Out Temp = 47.3 �F

 

When sent to Prowl, the body displayed is:

WC Temp1 = 90ð

 

Wx Out Temp = 47.3 °F

 

 

The ISY file /user/web/mydir.testlog.htm contains:

WC Temp1 = 90°

Wx Out Temp = 47.5 °F

 

You have far more important issues to address and I have other means of getting the degree symbol in notifications, so please use your time and efforts to better advantage than on this small issue. Thanks.

Posted

Yes, indeed. I've copied the degree symbol from Character Map and pasted it into the Custom Notification Body after the variable name.

But, I'm allowing Climate Module to provide the degree symbol for the current temperature variable. Perhaps a screen shot may help with my previously poor attempt at an explanation.

If I leave out the 2nd line with {mod.weather.temp.current}, the degree symbol in the 1st line of the body presents properly.

post-889-140474162216_thumb.jpg

Posted

Hello wrj0,

 

Thank you. That might explain the issue. I think the problem is translation from UTF-8 and somehow our Java UI is considering it as ASCII instead of UTF-8.

 

We'll look into it more once we have more time.

 

Thanks again for reporting it and your willingness to go the extra mile to provide all this valuable information which will help us in debugging.

 

With kind regards,

Michel

Guest
This topic is now closed to further replies.

×
×
  • Create New...