rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.15k stars 412 forks source link

`f.path=` return invalide string name if it contain emoji #1250

Open trim21 opened 1 year ago

trim21 commented 1 year ago

I have a torrent (I can provide if you need) which all file paths are utf-8 encoded. But becoding invalid string in rpc call:

for example:
套图/推特/211031_万圣节快乐🎃不给🍭不给看🧛‍♀️🧛‍♀️🧛‍♀️.jpg become ??????/??????/211031_?????????????????????????????????????????????????????????????????????????????.jpg

kannibalox commented 1 year ago

Unfortunately this is a limitation of the xmlrpc-c library, which only allows unicode characters from the basic multilingual plane: https://xmlrpc-c.sourceforge.io/doc/libxmlrpc_util.html#validate_utf8 (emoji are from the supplementary plane)

trim21 commented 1 year ago

Unfortunately this is a limitation of the xmlrpc-c library, which only allows unicode characters from the basic multilingual plane: https://xmlrpc-c.sourceforge.io/doc/libxmlrpc_util.html#validate_utf8 (emoji are from the supplementary plane)

said 😢

I found that https://github.com/jesec/rtorrent support json rpc and JSON rpc doesn't have this issue.