Software Venture Consulting
ToMarket

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

UrlEncode ( text )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.2  (29 votes)
  Discuss this Custom Function

Jeremiah Small, Soliant Consulting
http://jsmall.us

Converts illegal and reserved URL characters into URL-legal hex code.

Sample Input:
"http://www.database.com/page.php?field=" & UrlEncode ( "¶ \"!#$%&'()*+,-./:;<=>?@[\\]^`{|}" )
Sample Output:
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


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

A complete table of hexadecimal codes can be found here http://www.december.com/html/spec/ascii.html

Be aware that curly quotes (single and double) are high-ascii, and will not be converted with this function. If you need quotes, make sure your input is with straight quotes.

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

This is my Custom Function and I want to edit it

Discuss:

The following version adds in a few more important substitutions...

/* See http://www.faqs.org/rfcs/rfc2368.html for mailto specifications
The following substitutions and their order are important. mailto: will fail without them.
Reserved characterss in a mailto: URL are "-", "&", and "?"
Must escape the % first, before you start adding them in.
Then do spaces and returns.
Stupify quotes and other stuff
Non-breaking space
Does not handle double quotes or tabs (%09)
Could add substitutions for all diacriticals and other less common characters */

Substitute (text;
["%"; "%25"];
[ " "; "%20"];
["¶"; "%0D"];
[ "!" ; "%21" ] ;
[ "$" ; "%24" ] ;
[ "(" ; "%28" ] ;
[ ")" ; "%29" ] ;
[ "*" ; "%2A" ] ;
[ "+" ; "%2B" ] ;
[ "." ; "%2E" ] ;
[ "=" ; "%3D" ] ;
["\“"; "%22"];
[ "\”"; "%22"];
["‘"; "%27"];
["’"; "%27"];
["'"; "%27"];
["…"; "..."];
["•"; "*"];
[ "-"; "%2D"];
["&"; "%26"];
["="; "%3D"];
["?"; "%3F"];
["#"; "%23"];
[","; "%2C"];
[ "/"; "%2F"];
[":"; "%3A"];
[";"; "%3B"];
[ "<"; "%3C"];
[ ">"; "%3E"];
["@"; "%40&quo

Tim Cimbura, Minneapolis, MN
May 01, 2010 7:59pm

The above post got truncated. It won't work as displayed here.

Tim Cimbura, Minneapolis, MN
May 01, 2010 8:00pm

I added the german "Umlaute" whose are:

[ "A" ; "%C3%84" ] ;
[ "ä" ; "%C3%A4" ] ;
[ "Ö" ; "%C3%96" ] ;
[ "ö" ; "%C3%B6" ] ;
[ " Ü" ; "%C3%9C" ] ;
[ "ü" ; "%C3%BC" ] ;
[ "ß" ; "%c3%9F" ] )

Cheers

Alex

Alex, Berlin
March 31, 2011 2:01am

Of course it has to be "Ä" instead of "A"
and "Ü".

Alex, Berlin
March 31, 2011 2:04am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 3 + 6 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. phpArrayValue ( array ; key ; pos )
  (Fri, Jan 27, 1:49pm)
2. solfm_timeToMinutes (theTime;roundSec)
  (Fri, Jan 20, 6:26am)
3. filterLines(filterField;filterValue;Result)
  (Sat, Jan 14, 2:20pm)
4. getMaxValue ( theList )
  (Thu, Jan 12, 1:06pm)
5. MiddleWordsIncPunct ( text ; startingWord ; numberOfWords )
  (Sat, Jan 07, 9:16am)
6. WindowInfo
  (Fri, Jan 06, 12:39pm)
7. CenterWindow in Window vert horiz (demension)
  (Fri, Jan 06, 12:25pm)
8. UTF8_to_TXT ( Text , Platform )
  (Wed, Dec 28, 10:44pm)

RSS Feed of Custom Functions