miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Python module] Description encoding in addportmapping ?

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation
View previous topic :: View next topic  
Author Message
Goffi



Joined: 01 Oct 2015
Posts: 3

PostPosted: Thu Oct 01, 2015 12:21 pm    Post subject: [Python module] Description encoding in addportmapping ? Reply with quote

Hi,

I'm implementing UPnP IGD (client) into my projet with miniupnp and its Python module, thanks for your work and sharing Smile

Everything seems to work fine, but I couldn't find any documentation on the encoding supported by addportmapping desc argument: the method accept a bytestring, but I don't know what will be used on the device: for mine, latin1 seems to work, but is it standardized somewhere ? I would have expected utf-8 instead. Should I avoid any non-ascii character in description ?

Thanks
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1445

PostPosted: Fri Oct 02, 2015 1:17 pm    Post subject: Reply with quote

the string is passed "as is" in the XML which is UTF-8 (default encoding for XML).
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Goffi



Joined: 01 Oct 2015
Posts: 3

PostPosted: Wed Oct 07, 2015 2:00 pm    Post subject: Reply with quote

OK, so I guess my UPnP router is bugged, as encoded utf-8 result in bad encoding in the web page (but latin-1 is OK here).

Thanks for you answer
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1445

PostPosted: Wed Oct 07, 2015 2:46 pm    Post subject: Reply with quote

To be sure there is no problem, I would advice to only use pure ASCII in description.
That is what most application do anyway
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Goffi



Joined: 01 Oct 2015
Posts: 3

PostPosted: Thu Oct 08, 2015 9:49 am    Post subject: Reply with quote

Yes that's what I do now. Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.