Posts: 111
Joined: Dec 2008
Reputation:
0
hey guys, are these apis available (going to be available) on xbox xbmc?
I would hate to implement my XBMC remote using Http api but if this is not in plan to move, I have no other option.
thanks.
Posts: 12
Joined: Mar 2009
Reputation:
0
2010-12-03, 09:04
I'm trying to write a simple MPD gateway using the JSON-RPC API, but hit a snag when receiving filenames encoded in UTF-8 on the filesystem where XBMC resides. My XBMC instance is setup to use the encoding Western Europe (why is there no Unicode alternative?) and I found that the data sent via JSON-RPC could indeed be decoded with the cp850 encoding.
My question is, will this encoding change when I change the XBMC encoding, and can this be reflected with a 'Content-Encoding' header in the HTTP response in that case?
Posts: 12
Joined: Mar 2009
Reputation:
0
My bad. Didn't read the spec too carefully. In that case, the best option would be UTF-8 in both directions, IMO.
If I need to match a string, say a filename, in XBMC via JSON-RPC, must I first encode that string to the same encoding as used in XBMC before sending it?
XBMC: "Åland.mp3" (CP850)
Client: "\u00c5land.mp3" (UTF-8) -> "Åland.mp3" (CP850)
It would seem difficult to use the JSON-RPC API for international content if only the latin1 chars are available (barring content encoding)?
Posts: 12
Joined: Mar 2009
Reputation:
0
My specific problem is that the utf8 decoder in Python cannot decode the string returned by XBMC, but the cp850 decoder can. Is there a better way to ascertain what encoding I'm receiving?
Posts: 4,549
Joined: Dec 2007
Reputation:
17
topfs2
Team-Kodi Developer
Posts: 4,549
Would love some examples, might be that we don't return a proper utf-8?
(perhaps you could upload the exact received bytestream from xbmc somewhere?)
If you have problems please read
this before posting
Always read the
XBMC online-manual,
FAQ and
search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the
forum rules.
For troubleshooting and bug reporting please make sure you
read this first.
"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Posts: 12
Joined: Mar 2009
Reputation:
0
It seems I have some files in cp850, and some in latin1 in my filesystem. That explains that. Sorry to be a bother.
Posts: 4,549
Joined: Dec 2007
Reputation:
17
topfs2
Team-Kodi Developer
Posts: 4,549
Still, seems like we should handle it properly no matter.
So what did you have? I don't follow?
If you have problems please read
this before posting
Always read the
XBMC online-manual,
FAQ and
search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the
forum rules.
For troubleshooting and bug reporting please make sure you
read this first.
"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."