-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The base bencoding format specifies encoding only for strings of bytes, not Unicode strings. When decoding, there is no way to distinguish if the original data was an UTF-8 string or a byte buffer that appears to look like an UTF-8 string.
The module documentation should clearly specify (and the implementation be tested) how Perl strings with the utf8 flag given in the input to bencode will be handled. Throwing an exception would be an appropriate behavior, in order to force the user of the module to properly encode its data as bytes.
The bdecode function should clearly disallow a string of characters and allow only a string of bytes.
Metadata
Metadata
Assignees
Labels
No labels