alerts message messed up

  • 3
  • Problem
  • Updated 6 years ago
http://api.wunderground.com/api/key/a...


"message": "Snow/Ice Bei Temperaturen unter 0 Grad, teils zwischen -8 und \u000A -5 Grad, tritt Glätte durch Ã1⁄4berfrierende Nässe oder Reif auf Straßen\u000A und Wegen auf.&nbsp)",


the original message on http://meteoalarm.eu:

Snow/Ice
Nach dem Schneefall kommt es zu glatten Strasse durch Schnee, Schneematsch oderüberfrierender Nässe.
Photo of teamxbmc

teamxbmc

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 3
Photo of Hop Hop

Hop Hop

  • 4 Posts
  • 0 Reply Likes
Could some wunderland dev look at this? Would be great to have this solved.
Photo of attila.jakosa

attila.jakosa

  • 1 Post
  • 0 Reply Likes
Same problem with Hungarian strings.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
It has to do with us converting the characters to be safe in the message. If you switch to XML it has less of the problems. The data comes in with carriage returns, which breaks JSON, so we have to escape them. Unfortunately it doesn't look that great in JSON. The solution might be using XML on your end, and I'll see what we can do here to at least make that have the right chars.
Photo of MikeRhg

MikeRhg

  • 15 Posts
  • 3 Reply Likes
Thanks for the reply Brendan, but even in XML not all special characters are right. I am using german umlauts and most of them are still broken.

I already reported this nine months ago (see http://apicommunity.wunderground.com/...)

I was always using XML, so it looks like that I am on the lucky side with that decision when I hear that JSON is much more bad :-)
Photo of dnavarrojr

dnavarrojr

  • 1 Post
  • 0 Reply Likes
Any chance of adding a pre-parsed clean message?
Photo of Hop Hop

Hop Hop

  • 4 Posts
  • 0 Reply Likes
Brendan, any news on this?
Photo of G T Mittelstädt

G T Mittelstädt

  • 1 Post
  • 0 Reply Likes
@Brendan: It is happening because UTF-8 characters are interpreted as latin-1 somewhere on your servers.
Not really hard to fix.