Open josecelano opened 4 hours ago
Maybe we can always include some tags. For byte sequences containing valid UTF-8:
"<utf8>spam</utf8>"
And not UTF-8 sequences:
"<bytes>fffe</bytes>"
The encoded value 6:<utf8>
would be "<utf8><utf8></utf8>"
.
Maybe we can event simplify the metadata using just a prefix instead of a html-style tag:
"utf8:spam"
And not UTF-8 sequences:
"bytes:fffe"
What do you think @da2ce7 @mario-nt ? It's just the first idea I came up with.
Relates to: https://github.com/Chocobo1/bencode_online/issues/3
How do you represent bencoded strings that contain a tag to avoid ambiguity with the tags introduced by not utf-8 bencoded strings?
Submitted on reddit by Icarium-Lifestealer