Whitespace characters in text (or pct-char in general)

Hey,
I have a small question about whitspace characters and how they are handeled:
They should be encoded in PCT, am I right? How are they treated in the tostring()? Should we translate them or just check that, if given (for example https://%ad) are valid?

2 Likes

The user that wants to parse URLs should percent-encode them (functions that do this are usually called UrlEncode / UriEncode).
However, you have only to follow the grammar.
Therefore, you do not have to encode/decode spaces (or any other pct-encoded symbol for that matter).

1 Like