CHANGED: _server.sendResponse XML encoding problem/ python

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

dorgold
Posts: 2
Joined: 24 Feb 2010, 20:18

CHANGED: _server.sendResponse XML encoding problem/ python

Postby dorgold » 24 Feb 2010, 20:26

hi,

we are using unity3d on os x and smartfoxserver on debian

everything is working ok so far, but i have two open problems:

!!!
--- update: i am sending the data back as xml ans not as json as i have written before, sorry for the mistake, therefore the problem seems to exist with utf-8 chars in combination
with the XML message format
!!!

1) sending python server extension responses with _server.sendResponse / XML :

it seems that i can only send 7bit ascii strings back to the SFSclient, if i try to write 8bit strings ( utf8 ... ) into the response only '?'s arrive at the client side for that characters.
the problem is, however, that i have to transfer a lot of special chars ( umlaut, accents etc etc ), so i have tried to reencode these as UTF7, which is somehow broken within the SFS Server python API ( module codecs does not contain utf7 encoding )
what can i do ?

2) is there a way to find out which extension has triggered "OnExtensionResponse" on the client side, given that there are multiple registered server extensions ? - as workaround i currently use an "_ext" variable similar to the "_cmd" variable

thank you very much !
regards,
doron
dorgold
Posts: 2
Joined: 24 Feb 2010, 20:18

solved

Postby dorgold » 25 Feb 2010, 18:03

hi,

the utf-8 problem could be solved by rebuilding the client dll on os x

cheers
doron
kidovate
Posts: 13
Joined: 10 Apr 2010, 00:58

Extension Response?

Postby kidovate » 02 May 2010, 22:14

Hello!

This is driving me crazy... I have found nothing in the documentation or anything.

How do you receive a response in the unity API? I keep getting the error that System.Object doesn't have a variable _cmd.

Can someone give me an example?

Thanks!
Christian

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 23 guests