API: json unicode encoding problem

Need help? Post your questions here.

Moderator: moderators

API: json unicode encoding problem

Postby heddhunter » Tue Jan 03, 2012 2:05 am

I am making API calls, asking for data returned in json format. Although the HTTP headers from the API indicate Charset: UTF-8, I am seeing encoded entities in the json data. eg: jaïa instead of jaïa.

example API url:

http://subsonicserver.local/rest/getMus ... 6174696f6e

partial response:
{
"album":
"Quality Relaxation",
"artist":
"Jaïa",
"bitRate":
199,
"contentType":
"audio/mpeg",
"coverArt":
"653a5c6d70335c4368696c6c206f75745c7175616c6974792072656c61786174696f6e5c636f7665722e6a7067",
"duration":
492
}

If you're delivering UTF-8 it should contain UTF-8 characters, not HTML entities.
I would expect to see "jaïa"... is it possible to have this happen?
heddhunter
 
Posts: 21
Joined: Tue Dec 06, 2011 5:17 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 34 guests