I have an additional question (a little bit related to this).
Are there any possibility to use 24h display in the time chooser combo box instead of the 12h display?
Address encoding is a known issue and I'm trying to fix it. I have created an issue on GitHub:
https://github.com/tananaev/traccar/issues/1298
As for 24h time, I will implement localization options in future.
Hi
I'm using Traccar Server v3.1 with google geocoding and I am also experiencing some strange behavior regarding Č,č,Ž,ž,Š,š,Ć,ć,Đ,đ characters. I believe the same goes to Ä,ä,Ö,ö,Ü,ü and other non-standard characters.
I found out that the address gets written into database with corrupted characters. I ran the url to google's api directly in browser and there I get correct characters. Based on that, I assume that the address field is populated with some other character set that doesn't support such characters.
I intended to solve the problem with a MySQL hack, implementing a trigger, which before insert replaces all the faulty characters with the correct ones. It works, but it's not the solution, as I would need to know the "faulty" pairs of each non-standard character.
Besides that, following anomaly occurs:
I am using Traccar web API in an Android application and the points with correct characters were again sent trough API with false characters. Then I restarted the service and after that, the address gets read troug API correctly. But as soon as a new point comes into the system after the Traccar service restart it's read false troug API.
Any idea?
Thanks
If you are using MySQL database make sure you have following parameters in the URL:
useUnicode=yes characterEncoding=UTF-8
Do you mean in database.url entry key (traccar.xml) like this?<entry key='database.url'>jdbc:mysql://127.0.0.1:xxxx/traccar31?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8</entry>
Oh...sorry...a note to me: RTFM
Thanks again.
Geretings
Me again...
not working...I tried with "useUnicode=yes" and "useUnicode=true" (according to JDBC connector documentation)
Any further ideas?
Thanks
Make sure you encode "&" (ampersand) as "&" in the config file.
Hi Anton.
Something isn't right...
My database.url line:
<entry key='database.url'>jdbc:mysql://127.0.0.1:xxxx/traccarxx?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8</entry>
with correctly encoded ampersands...
if I restart the service, I get the existing addresses correctly, but as soon as a new point comes in, I get the address with corrupt characters. There must be a cache in Traccar server somewhere as I changed the address completely and I still get the same corrupt address as before with API query.
Please have a look at the problem and let me know how to solve it. Is there any way to disable the cacheing? I would like to get al the points trough API and not just the new ones as predicted.
Best regards
There is a cache for current location, but if you get it from archive (bottom panel in the web interface), it comes directly from database.
Yes, that's correct.
But how can I force Traccar server send UTF-8 encoded characters via API's "async" call? In this case it doesn't matter how database url entry is set up right?
Thanks
To sum up...it is obvious that the address that traccar server gets from geocoding API doesn't get read correct and the "faulty" characters get inserted into DB. The database.url parameters are OK and working, as we get manually corrected "archived" addresses read out correctly, but nut the cached ones and at the same time those are the ones that get inserted into the DB.
So my question now is:
Where (if possible) can I set the charset for Java and/or Traccar server to handle the address strings correctly?
Thanks
Greetings
Java strings are always in the same encoding as far as I know, so the problem must be somewhere on the border between Java and MySQL.
Try this. It did the trick to me:
https://www.traccar.org/forums/topic/mysql-error-change/page/2/#post-1610
Hi
I'm using traccar from Hungary. In our language there are several ascended characters (like éáűőúüóöí or ÉÁŰŐÚÜÓÖÍ).
Unfortunately the web client (3.0) display '??' instead of the correct character in the Address field.
Do you have any solutions for this issue? Are there any configuration for this (like UTF-8 character set)?
Thanks,
Sandor