FlightAware Discussions

Alert encoding

#1

Hi,

When I try real push notifications, french accents are broken. I receive text like “ADR1218 arrivé à GVA de FRA”.

I have the same issue with the FlightXML Push Notification Testing Interface (https://fr.flightaware.com/commercial/flightxml/send.rvt). For the summary “Arrivé à GVA” I receive “Arrivé à GVA”.

The FlightXML request encoding is set as UTF-8 (“content-type: application/json; charset=utf-8”). But I don’t know if it’s right or if text was broken previously.

Regards

#2

We’re having a look. It looks like there’s a character set conversion error that’s occurring before the alert is sent.

#3

Thank you for your feedback, will it be fixed soon?

#4

Yesterday all alert I recieved had a brocken encoding.

Lufthansa #2386 est arrivé à Int’l de Genève (GVA) à 16:19 CET de Int’l Franz-Josef-Strauss de Munich (MUC) après 0:52 en route Destination (Int’l de Genève / GVA): Terminal 1

What can I do?

Regards

#5

This bug has not yet been resolved. It’s currently prioritized for development, but I’m unable to provide an estimated time of fix yet.

#6

Are you able to share the raw JSON you receive from the alerts? The messages appear to have correct formatting at the time of send. It looks as if the two byte characters (é: c3 a9) are being treated as a pair of code points (Ã: U+00C3, ©: U+00A9) on decode.

#7

Here a log of last alert with request content and headers

2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - {"summary":"AFR1042 arrivé à GVA de CDG","long_desc":"Air France #1042 est arrivé à Int'l de Genève (GVA) à 08:55PM CET de Paris-Charles-de-Gaulle (CDG) après 0:43 en route","flight":{"actual_blockin_time":0,"aircrafttype":"A319","estimated_blockout_time":0,"filed_departuretime":1550425200,"origin":"LFPG","filed_ete":"00:56:00","actual_blockout_time":1550429880,"estimatedarrivaltime":1550434083,"filed_altitude":0,"actualdeparturetime":1550430723,"destination":"LSGG","filed_time":1550430901,"faFlightID":"AFR1042-1550211922-airline-0430","filed_blockout_time":0,"ident":"AFR1042","route":"","reg":"FGRHF","estimated_blockin_time":0,"filed_airspeed_kts":265,"actualarrivaltime":1550433358,"filed_blockin_time":0,"filed_arrivaltime":1550428560},"eventcode":"arrival","short_desc":"AFR1042 arrivé à GVA de CDG","alert_id":28701621}
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - HEADERS:
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - host: app.provatis.com
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - user-agent: FlightXML/2.0 (mc_chan_flightxml)
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - accept: */*
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - content-type: application/json; charset=utf-8
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - content-length: 859
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - x-forwarded-proto: https
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - x-forwarded-for: 216.**.***.***
2019-02-17 20:56:15,106 INFO  connect.ConFlightXmlController  - connection: close

Normally if content is UTF-8 like it is defined in the request header, my framework should decode correctly the request content but accents are broken