I had experienced different JSON encoded value for the same string depending on the language used in the past. Since the APIs were used in closed environment (no 3rd parties allowed), we made a compromise and all our Java applications are manually encoding Unicode characters. LinkedIn's API is returning "corrupted" values, basically the same as our Java applications. I've already posted a question on their forum, the reason I am asking it here as well is quite simple; sharing is caring :) This question is therefore partially connected with LinkedIn, but mostly trying to find an answer to the general encoding problem described below.
As you can see, my last name contains a letter ž
, which should be \u017e
but Java (or LinkedIn's API for that matter) returns \u009e
with JSON and nothing with XML response. PHP's json_decode()
ignores it and my last name becomes Kurida.
After an investigation, I've found ž
apparently has two representations, 9e and 17e. What exactly is going on here? Is there a solution for this problem?