URLEncode
encodes spaces as plus symbols, but this isn't what we want:
The encoding used by default is based on a very early version of the general URI percent-encoding rules, with a number of modifications such as newline normalization and replacing spaces with "+" instead of "%20"
URLEncode["bad space"]
(*yields "bad+space", should be "bad%20space"*)
Is there any way to get the " "->"%20" behavior by default?
Related: https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20
Needs["GeneralUtilities`"]; PrintDefinitions[URLEncode]
and you will see the definition. It's easy to copy that definition, change the" " -> "+"
to" " -> "%20"
and overwrite the default definition, if that's what you want. "should be" is a strong statement, considering that it appears to still be common to convert spaces into +. $\endgroup$