unescape
Decode a percent-encoded string s (libtorrent unescape_string).
+ is decoded to a space and %XX to the corresponding byte; the resulting bytes are then interpreted as UTF-8. Mirroring the C++ error handling, a malformed escape (% at end of input, or a non-hex digit after %) causes decoding to stop and return whatever was accumulated so far rather than throwing. Use unescapeBytes if you need the raw decoded bytes (e.g. for a binary info-hash) without the UTF-8 step.