View previous topic :: View next topic |
Author |
Message |
Goffi
Joined: 01 Oct 2015 Posts: 3
|
Posted: Thu Oct 01, 2015 12:21 pm Post subject: [Python module] Description encoding in addportmapping ? |
|
|
Hi,
I'm implementing UPnP IGD (client) into my projet with miniupnp and its Python module, thanks for your work and sharing
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
Posted: Fri Oct 02, 2015 1:17 pm Post subject: |
|
|
the string is passed "as is" in the XML which is UTF-8 (default encoding for XML). _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
Goffi
Joined: 01 Oct 2015 Posts: 3
|
Posted: Wed Oct 07, 2015 2:00 pm Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
Posted: Wed Oct 07, 2015 2:46 pm Post subject: |
|
|
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.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
Goffi
Joined: 01 Oct 2015 Posts: 3
|
Posted: Thu Oct 08, 2015 9:49 am Post subject: |
|
|
Yes that's what I do now. Thanks again. |
|
Back to top |
|
|
|