Uspinhal
(Rodrigo A Barbosa)
March 19, 2018, 11:12pm
1
Hi everyone.
I´m trying to translate some informations to show in my UI. My .map file seems like this:
SPRING=Primavera
SUMMER=Verão
AUTUNM=Outono
WINTER=Inverno
But the word “Verão” is showing in a bad character: “Verão”
How can I put this symbol (ã) on the UI?
namraccr
(namraccr)
March 19, 2018, 11:21pm
2
Is your file encoded in UTF-8? Also, which UI?
Uspinhal
(Rodrigo A Barbosa)
March 19, 2018, 11:24pm
3
I realy don´t know.
Where I can see if it´s encoded in UTF-8?
All the UIs. Basic UI, HABPanel, and the mobile app
namraccr
(namraccr)
March 19, 2018, 11:29pm
4
Depends on the editor you’re using.
Uspinhal
(Rodrigo A Barbosa)
March 19, 2018, 11:35pm
5
I´m using Eclipse Smarthome Designer
Josar
(Josar)
March 20, 2018, 12:00am
6
For me it works out of the box.
Seems your file encoding is not right.
In Eclipse select the file right click and choose the last option Properties
. The file encoding should be listed there.
Did you create the file in eclipse? It should ussually create all files as UTF-8.
You can also use notepad++, it shows the file encoding in the bottom area.
Uspinhal
(Rodrigo A Barbosa)
March 20, 2018, 12:10am
7
OK…
In the Eclipse I can´t find the file properties.
On the notepad++ it shows the encoding UTF-8 like yours, so I don´t know where is the problem
Josar
(Josar)
March 20, 2018, 12:37am
8
Does it also look ok in notepadd++? I asume it does.
This is the second complain about encoding in the last days.
Maybe its related.
I want to get a date from a website, which I get via the HTTP-binding. The problem is that the encoding isn’t correctly interpreted by the binding and so the umlauts aren’t correctly shown. The Basic UI just show a ? instead of the “ä” in März. How can I fix this?
Website code:
<tr><td width="22%" height="47"><font color="Gray"><b><nobr>Datum</nobr></b></font></td>
<td align="center" width="7%" height="47"><img border="0" src="cal.gif" width="51" height="40"></td>
<td align="center" width="52%…
opened 07:19AM - 12 Mar 18 UTC
The binding does not support umlauts on a html site with the encoding ISO-8859-1… .
When I print out the value saved in a item, I get the following output:
`11. M�rz 2018`
This is my item:
`String Temp_Date "Datum [%s]" <calendar> { http="<[datenlogger:3000:REGEX((?s).*Datum.*([1-3 ][0-9]. [A-zöäü]+ [0-9]{4})..font.*)]" }`
Website code:
```
<tr><td width="22%" height="47"><font color="Gray"><b><nobr>Datum</nobr></b></font></td>
<td align="center" width="7%" height="47"><img border="0" src="cal.gif" width="51" height="40"></td>
<td align="center" width="52%" height="47" colspan="7"><b><font size="4">Mittwoch, 7. März 2018</font></b></td></tr>
<tr><td width="22%" height="46"><font color="Gray"><b><nobr>Zeit</nobr></b></font></td>
<td align="center" width="7%" height="46"><img border="0" src="clock.gif" width="41" height="40"></td>
<td align="center" width="52%" height="47" colspan="7"><b><font size="5">19:30</font></b></td></tr>
<tr><td width="22%" height="46"><font color="Gray"><b><nobr>Temperatur Innen</nobr></b></font></td>
```
Meta tags from the website:
```
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
```
We already adressed this issue in this OpenHAB Community Thread: [https://community.openhab.org/t/http-binding-problem-with-umlauts/41355](https://community.openhab.org/t/http-binding-problem-with-umlauts/41355)
I'm using OpenHAB 2.2 Release on a Debian 8 environment.
Uspinhal
(Rodrigo A Barbosa)
March 20, 2018, 12:59am
9
Ok, I tried all the encode and finally ANSI format works.
Thanls a lot.
Josar
(Josar)
March 20, 2018, 1:39am
10
so you changed the encoding of the MAP file until the character are displayed correctly?
Uspinhal
(Rodrigo A Barbosa)
March 20, 2018, 1:54am
11
Yes. And test with others MAP files and work to.
It seems the UTF-8 doesn´t work well with Latin characters
namraccr
(namraccr)
March 20, 2018, 3:22am
12
How are you creating your “Latin” characters in the editor? Typing them? Or copy and paste? If the latter, from what source?
namraccr
(namraccr)
March 20, 2018, 3:26am
13
Ok, I tried all the encode and finally ANSI format works.
See this explanation of the so-called “ANSI” format .
Uspinhal
(Rodrigo A Barbosa)
March 20, 2018, 4:00am
14
Just typing. I’m from Brazil and in Portuguese we have some kind of characters like ã, á, é, ó.
OzZy_HH
(OzZy)
March 20, 2018, 7:11am
15
Can you try UTF8 encoding once more with a property set? Maybe this is related to the same issue which I experienced, take a look here
Hello OH Community,
I am using OH2 atm and added some special unicode characters to my transform files, so that they will look pretty on my sitemap. Unfortunatly I had some problems with APT installed version from the repository, It could’nt read the unicode symbols properly. The tar.gz archive version runs well with unicode symbols (ofc same OH release).
I figured out what the actual difference is in both versions: It’s the file encoding JVM property.
I started the archive version from comma…