Closed andimik closed 2 years ago
Thanks! Just for reference, I think I need to embed a newer version of jsoncpp and enable emitUTF8 https://stackoverflow.com/questions/50637362/how-can-i-ask-jsoncpp-to-encode-unicode-strings
See if this helps! I quickly tested by converting one of the location tables I have into UTF-8, and it printed the names fine.
Yes, this works now :-)
$ rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 90.4M | redsea -E -l /media/andreas/Data/ut/TMC/AUT/ | grep ß
[...]
{"pi":"0xA203","group":"8A","bler":2,"prog_type":"Pop music","tmc":{"message":{"coordinates":[{"lat":47.79785,"lon":13.398},{"lat":47.81628,"lon":13.36415}],"description":"Single alternate line traffic. Construction work.","direction":"single","event_codes":[513,803],"extent":"+1","location":36918,"road_name":"Mondsee Straße","road_number":"B154","span_from":"Oberösterreich / Salzburg","span_to":"Plomberg","update_class":5,"urgency":"none"}},"tp":true}
{"pi":"0xA203","group":"8A","bler":0,"prog_type":"Pop music","tmc":{"message":{"coordinates":[{"lat":47.40637,"lon":12.9732}],"description":"Single alternate line traffic. Construction work.","direction":"single","event_codes":[513,803],"extent":"-0","location":31015,"road_name":"Hochkönig Straße","road_number":"B164","update_class":5,"urgency":"none"}},"tp":true}
{"pi":"0xA203","group":"8A","bler":0,"prog_type":"Pop music","tmc":{"message":{"coordinates":[{"lat":46.56004,"lon":13.27568}],"description":"Closed. Construction work.","direction":"both","event_codes":[401,803],"extent":"-0","location":6723,"road_name":"Nassfeld Straße","road_number":"B90","update_class":5,"urgency":"U"}},"tp":true}
$ rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 104M | redsea -E -l /media/andreas/Data/ut/TMC/SVN/ | grep š
[...]
{"pi":"0x9202","group":"8A","bler":4,"prog_type":"No PTY","tmc":{"message":{"coordinates":[{"lat":46.48195,"lon":15.65783}],"description":"Slip road restrictions.","direction":"single","event_codes":[409],"extent":"-0","location":30136,"road_name":"Maribor - Gruškovje","road_number":"A4","update_class":7,"urgency":"none"}},"tp":true}
{"pi":"0x9202","group":"8A","bler":17,"prog_type":"No PTY","tmc":{"message":{"coordinates":[{"lat":45.93114,"lon":14.06465}],"description":"Single alternate line traffic.","direction":"both","event_codes":[513],"extent":"+0","location":44444,"road_name":"Godovič - Ajdovščina","road_number":"207","update_class":5,"urgency":"none"}},"tp":true}
I'll close this issue.
After several years I have tried TMC again today and discovered that the JSON output prints the C++ Unicode source code and not the character like in
NAMES.DAT
For example:
Slovenia
Hint: Menge\u0161 - Braslov\u010de is Mengeš - Braslovče
Austria
Hint: K\u00e4rntner Stra\u00dfe is Kärntner Straße
This seems to be in redsea/src/tmc/locationdb.cc lines 65ff.