In removeEscapeChars(), simply one sequence starting at % is analyzed one symbol. (e.g. %20 -> whitespace)
But if this escaped chars are coded by UTF-8 (I think UTF-8 is now standard encoding type in Web.), this way is too bad.
%E3%83%86, these 3 escaped characters represent one symbol. (A Japanese “Katakana” word). By using current method, these are translated into 3 chars…
So, I’m sure that removeEacapeChar function needs encoding-type.
I think it’s the right behaviour.
%E3%83%86 should return the 3 chars 0xe3, 0x83, 0x86
However, they are not translated from UTF8, as the function doesn’t know it was encoded in UTF8 (can be UTF16, or any other encoding).
What you can do, is to specify the conversion explicitely like :
String url = yourURLHere;
String decodedUrl = String::fromUTF8(URL::removeEscapedChars(url));
// Then use decodedUrl