Decoding URL encoded UTF-8 strings in VBScript
问题 I need to URL decode a string in a VBScript. The string may contain Unicode characters which are encoded as multiple bytes as per UTF-8. So for example "Paris%20%E2%86%92%20Z%C3%BCrich" would decode to "Paris → Zürich". To do the job, I'm using a piece of code that looks like this: Function URLDecode(str) set list = CreateObject("System.Collections.ArrayList") strLen = Len(str) for i = 1 to strLen sT = mid(str, i, 1) if sT = "%" then if i + 2 <= strLen then list.Add cbyte("&H" & mid(str, i +