Just ask ![]()
For other users:
E2 9A A0 is the Bytes Code for the entry code UTF-8 value U+26A0, the ![]()
C2 B0 is the Bytes Code for the entry code UTF-8 value U+00B0 = °
(Please check and understand also the other changesâŠ)
/system
:local tempSystem [:tonum ([health get [find where name=temperature]]->"value")]
:local DeviceName [identity get name]
:local tempMax 45
:if ($tempSystem >= $tempMax) do={
:log error "HIGH Temperature Alert: $tempSystem\B0\43"
# START Send Telegram Module
:local MessageText "\E2\9A\A0 <b>Router $DeviceName:</b>%0AHIGH Temperature Alert: $tempSystem\C2\B0\43"
:local SendTelegramMessage [:parse [/system script get MyTGBotSendMessage source]]
$SendTelegramMessage MessageText=$MessageText
# END Send Telegram Module
/tool e-mail send to="<MAIL-ADDRESS>" subject="\E2\9A\A0 [$DeviceName] HIGH Temperature Alert" \
body="The temperature in the router has reached a value of $tempSystem\C2\B0\43"
} else={
:log info "The temperature is within the normal range: $tempSystem\B0\43"
}
I have not tested if MessageText is correctly translated to the correct URL when fetching within MyTGBotSendMessage and what the Telegram API accepts.
But the correct way to write that string is not with \xx.
If the URL is not converted to the correct URL inside by MyTGBotSendMessage (ignoring if the router name has spaces or special characters),
it should be written on one of that modes:
â%E2%9A%A0+%3Cb%3ERouter+$DeviceName%3A%3C%2Fb%3E%0AHIGH+Temperature+Alert%3A+$tempSystem%C2%B0%43"â%E2%9A%A0 Router $DeviceName:%0AHIGH Temperature Alert: $tempSystem%C2%B0%43"
You can check the other codes for ASCII 8-bit CP1252 to UTF-8 here
http://forum.mikrotik.com/t/rextended-fragments-of-snippets/151033/1 [$ASCIItoCP1252toUTF8 (â\B0â)]
%C2%B0