Brian Dunning's FileMaker Custom Functions

UrlDecode ( text )

Decodes URL encoded text

  Average rating: 3.8 (52 votes) Log in to vote

Jeremiah Small   Jeremiah Small
Soliant Consulting, Inc.
https://www.soliantconsulting.com

Share on Facebook Share on Twitter

  Sample input:
URLDecode ( "http://www.database.com/page.php?field=%0D%20%22%21%23%24%25%26%27%28%29%2A%2B%2C%2D%2E%2F%3A%3B%3C%3D%3E%3F%40%5B%5C%5D%5E%60%7B%7C%7D" )
  Sample output:
http://www.database.com/page.php?field=" & UrlEncode ( "¶ \"!#$%&'()*+,-./:;<=>?@[\\]^`{|}" )

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Decodes URL encoded text

 

Comments

Rakesh   Rakesh, Amsterdam
Sep 13, 2012
Thanks for the great function, there should be a FM standard URLdecode function, but until then, this is great.

Here is the full list I'm using in multiple parts since there 's a 1500 character reply limit.


["%0D";"¶"];
["%20";" "];
["%21";"!"];
["%22";"\""];
["%23";"#"];
["%24";"$"];
["%25";"%"];
["%26";"&"];
["%27";"'"];
["%28";"("];
["%29";")"];
["%2A";"*"];
["%2B";"+"];
["%2C";","];
["%2D";"-"];
["%2E";"."];
["%2F";"/"];
["%3A";":"];
["%3B";";"];
["&lt;";""];
["%3D";"="];
["&gt;";""];
["%3F";"?"];
["%40";"@"];
["%5B";"["];
["%5C";"\\"];
["%5D";"]"];
["%5E";"^"];
["%5F";"_"];
["%60";"`"];
["%7B";"{"];
["%7C";"|"];
["%7D";"}"];
["%7E";"~"];
["%A0";" "];
["%A1";"¡"];
["%A2";"¢"];
["%A3";"£"];
["%A4";"¤"];
["%A5";"¥"];
["%A6";"¦"];
["%A7";"§"];
["%A8";"¨"];
["%A9";"©"
 
Rakesh   Rakesh, Amsterdam
Sep 13, 2012
Part II

];
["%C0";"À"];
["%C1";"Á"];
["%C2";"Â"];
["%C3";"Ã"];
["%C4";"Ä"];
["%C5";"Å"];
["%C6";"Æ"];
["%C7";"Ç"];
["%C8";"È"];
["%C9";"É"];
["%CA";""];
["%CB";"Ë"];
["%CC";"Ì"];
["%CD";"Í"];
["%CE";"Î"];
["%CF";"Ï"];
["%D0";"Ð"];
["%D1";"Ñ"];
["%D2";"Ò"];
["%D3";"Ó"];
["%D4";"Ô"];
["%D5";"Õ"];
["%D6";"Ö"];
["%D7";"×"];
["%D8";"Ø"];
["%D9";"Ù"];
["%DA";"Ú"];
["%DB";"Û"];
["%DC";"Ü"];
["%DD";"Ý"];
["%DE";"Þ"];
["%DF";"ß"];
["%E0";"à"];
["%E1";"á"];
["%E2";"â"];
["%E3";"ã"];
["%E4";"ä"];
["%E5";"å"];
["%E6";"æ"];
["%E7";"ç"];
["%E8";"è"];
["%E9";"é"];
["%EA";"ê"];
["%EB";"ë"];
["%EC";"ì"];
["%ED";"í"];
["%EE";"î"];
["%EF";"ï"];
["%F0";"ð"];
[&q
 
Rakesh   Rakesh, Amsterdam
Sep 13, 2012
looks like you need to replace '&qu ot' with ' " '.

Don't think anyone needs these, but just incase.

["%30";"0"];
["%31";"1"];
["%32";"2"];
["%33";"3"];
["%34";"4"];
["%35";"5"];
["%36";"6"];
["%37";"7"];
["%38";"8"];
["%39";"9"];

["%41";"A"];
["%42";"B"];
["%43";"C"];
["%44";"D"];
["%45";"E"];
["%46";"F"];
["%47";"G"];
["%48";"H"];
["%49";"I"];
["%4A";"J"];
["%4B";"K"];
["%4C";"L"];
["%4D";"M"];
["%4E";"N"];
["%4F";"O"];
["%50";"P"];
["%51";"Q"];
["%52";"R"];
["%53";"S"];
["%54";"T"];
["%55";"U"];
["%56";"V"];
["%57";"W"];
["%58";"X"];
["%59";"Y"];
["%5A";"Z"];

["%61";"a"];
["%62";"b"];
["%63";"c"];
["%64";"d"];
["%65";"e"];
["%66";"f"];
["%67";"g"];
["%68";"h"];
["%69";"i"];
["%6A";"j"];
["%6B";"k"];
["
 
Rakesh   Rakesh, Amsterdam
Sep 13, 2012
Code seems to get messed up a bit, so fix where needed like ["%41";"A"];
 
Philip   Philip, Dallas
Aug 30, 2016
For best results, move the [ "%25" ; "%" ] to the bottom of the list. Otherwise, if there are any embedded %'s they may be re-interpreted as an additional escape sequence.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.