Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support unicode in torrent names #137

Closed
milahu opened this issue Jun 17, 2024 · 2 comments
Closed

support unicode in torrent names #137

milahu opened this issue Jun 17, 2024 · 2 comments

Comments

@milahu
Copy link

milahu commented Jun 17, 2024

$ curl -s http://localhost:3030/torrents/1  | jq -r .name
<92 bytes>

actual title

System of a Down - Protect The Land & Genocidal Humanoidz (2020) Mp3 320kbps [PMEDIA] ⭐️

in error messages, rqbit shows

System of a Down - Protect The Land & Genocidal Humanoidz (2020) Mp3 320kbps [PMEDIA] ⭐\u{fe0f}
$ torrenttools show name bad.torrent | cut -c87-
⭐

$ torrenttools show name bad.torrent | cut -c87- | tr -d $'\n' | xxd -p
e2ad90efb88f

$ torrenttools show name bad.torrent | tr -d $'\n' | wc -c
92

e2ad90 = ⭐ = White Medium Star = U+2B50

efb88f = Variation Selector-16 = U+FE0F → star emoji

unicode in file paths is working

@ikatson
Copy link
Owner

ikatson commented Jun 19, 2024

@milahu can you share a .torrent or magnet that appears broken? afaik the names are just treated as utf-8

@milahu
Copy link
Author

milahu commented Jun 19, 2024

these work, so some utf8 works

Die Wiederkehr des Königs
Weltretten.für.Anfänger
Götzen-Dämmerung

these break, they all have a title like <92 bytes>

System of a Down - Protect The Land & Genocidal Humanoidz (2020) Mp3 320kbps [PMEDIA] ⭐️
Die Ärzte - Essentials (2020) Mp3 320kbps [PMEDIA] ⭐️
The Devil's Chessboard - David Talbot - 2015 (Biography) [Audiobook] (miok)
Nicholas Britell - Don't Look Up (Soundtrack from the Netflix Film) (2021) Mp3 320kbps [PMEDIA] ⭐️
JFK to 911 Everything Is A Rich Man's Trick (2015)
magnet:?xt=urn:btih:83414ce73318de33ba1289413b86b498a3ba4227&dn=System%20of%20a%20Down%20-%20Protect%20The%20Land%20%26%20Genocidal%20Humanoidz%20%282020%29%20Mp3%20320kbps%20%5BPMEDIA%5D%20%E2%AD%90%EF%B8%8F
magnet:?xt=urn:btih:a5b6396855a2717622647b4c4d01709d5d5aefb7&dn=Die%20%C3%84rzte%20-%20Essentials%20%282020%29%20Mp3%20320kbps%20%5BPMEDIA%5D%20%E2%AD%90%EF%B8%8F
magnet:?xt=urn:btih:8b7bd53550cd62155b704b667ddc4262d3c128a5&dn=The%20Devil%27s%20Chessboard%20-%20David%20Talbot%20-%202015%20%28Biography%29%20%5BAudiobook%5D%20%28miok%29
magnet:?xt=urn:btih:24a249fce5cb35902dc3d84da3171e81c0fc17f9&dn=Nicholas%20Britell%3A%20Dont%20Look%20Up%20%28Soundtrack%20From%20The%20Netflix%20Film%29%20%282021%29%20Mp3%20320kbps%20%5BPMEDIA%5D
magnet:?xt=urn:btih:ba7f1ad9916dfcb66c79b89df010d04bd3dbdae7&dn=JFK%20to%20911%20Everything%20Is%20A%20Rich%20Man%27s%20Trick%20%282015%29

probably it breaks at

efb88f = Variation Selector-16 = U+FE0F

and it also seems to break at single quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants