Page 1 of 1
URL decoding
Posted: Mon Aug 14, 2023 5:14 am
by BarryG
Is this supposed to give the output I want, or is it a bug, or am I way off the mark about it?
Code: Select all
Debug URLDecoder("My PC's Files") ; Want: My PC's Files
Re: URL decoding
Posted: Mon Aug 14, 2023 5:38 am
by Little John
BarryG wrote:
Is this supposed to give the output I want
No.
Code: Select all
; Want: My PC's Files
Debug URLEncoder("My PC's Files") ; -> "My%20PC's%20Files"
Debug URLDecoder("My%20PC's%20Files") ; -> "My PC's Files"
Re: URL decoding
Posted: Mon Aug 14, 2023 5:45 am
by BarryG
So how would I convert HTML encoding like this to it's normal plain text -> "My PC's Files"
Re: URL decoding
Posted: Mon Aug 14, 2023 5:56 am
by Little John
For HTML en/decoding, we have to write our own code, see e.g.
viewtopic.php?p=276574#p276574
Re: URL decoding
Posted: Mon Aug 14, 2023 9:42 am
by BarryG
I came up with a (bad hacky) routine to fix it. All good now.