Comments (2)
That's a non-standard field AFAIK. It's useless anyway - the correct thing to do nowadays is (and has been for along time now) to simply assume UTF-8.
Usage of any other encodings for text is just wrong and should be considered a bug/misfeature in software that uses/expects them by default.
Similarly, if someone creates a torrent whose filenames/title/comment are not UTF-8 encoded, that's a problem on their side that they should fix.
from mktorrent.
To further strengthen my argument, here is a relevant quote from the spec, https://www.bittorrent.org/beps/bep_0052.html (emphasis mine):
BEP authors are encouraged to use ASCII-compatible strings for dictionary keys and UTF-8 for human-readable data.
(...)
All strings in a .torrent file defined by this BEP that contain human-readable text are UTF-8 encoded.
(...)
file tree
A tree of dictionaries where dictionary keys represent UTF-8 encoded path elements. Entries with zero-length keys describe the properties of the composed path at that point. 'UTF-8 encoded' in this context only means that if the native encoding is known at creation time it must be converted to UTF-8. Keys may contain invalid UTF-8 sequences or characters and names that are reserved on specific filesystems. Implementations must be prepared to sanitize them. On most platforms path components exactly matching '.' and '..' must be sanitized since they could lead to directory traversal attacks and conflicting path descriptions. On platforms that require valid UTF-8 path components this sanitizing step must happen after normalizing overlong UTF-8 encodings.
And also from the legacy v1 spec, https://www.bittorrent.org/beps/bep_0003.html (again, emphasis mine):
All strings in a .torrent file that contains text must be UTF-8 encoded.
(...)
The name key maps to a UTF-8 encoded string which is the suggested name to save the file (or directory) as. It is purely advisory.
(...)
path
- A list of UTF-8 encoded strings corresponding to subdirectory names, the last of which is the actual file name (a zero length list is an error case).
from mktorrent.
Related Issues (20)
- Unable to create torrent of files over 2GB on 32bit OS HOT 1
- Update for BitTorrent Protocol Specification v2 HOT 13
- Request: Automatic Piece Length HOT 3
- Request: Set source tag
- mktorrent seems to be able to create torrent files with more bencoded items than clients can handle HOT 5
- mktorrent doesn't allow one to overwrite an existing file
- mktorrent(1) doesn't support output to stdout HOT 1
- ALLINONE and EXPORT macros HOT 3
- Can't make mktorrent HOT 1
- Does not build on Alpine 3.11
- How to select the folder or file to be planted? HOT 2
- -x : ensure info hash is unique for easier cross-seeding HOT 3
- Mktorrent v1.1 not showing progress status while creating torrent HOT 3
- how do we see the detailed hashing process like Version 1.0 does? HOT 14
- feature request: create magnet
- feature: option to disable "created by" metadata
- Update the upstream ("general gossip") email address in init.c
- Please include a manpage
- new release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mktorrent.