Brian Dunning's FileMaker Custom Functions

FilterASCII ( text ; extended )

Removes characters from text, retaining only printable ASCII characters.

  Average rating: 4.3 (38 votes) Log in to vote

Michael Horak   Michael Horak - Show more from this author
*COMMENT Visual Realisation

Share on Facebook Share on Twitter

  Sample input:
FilterASCII ( "$10 (£8) to Mæstro Hœfler, ©2010 Résumé & Co. " ; 0 )


FilterASCII ( "$10 (£8) to Mæstro Hœfler, ©2010 Résumé & Co. " ; 1 )
  Sample output:
$10 (8) to Mstro Hfler, 2010 Rsum & Co.


$10 (£8) to Mæstro Hfler, ©2010 Résumé & Co.

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

Removes characters from text, retaining only printable characters included in the American Standard Code for Information Interchange (US-ASCII) character set.

The following characters are passed by the filter:
• Horizontal Tab [9];
• Carriage return [13];
• Space [32];
• Characters [33]..[126].

When the extended parameter is True(1), characters in the extended ASCII character set range [128]..[255] are also passed.

This function is NOT recursive.

 

Comments

Bart Bartholomay   Bart Bartholomay, Vero Beach
Mar 27, 2011
In your second example I notice that the "œ" should be retained under "extended".
 
comment   comment, VR
Mar 27, 2011
No, it shouldn't. The example is designed to demonstrate the difference between "æ" [230], a member of the extended ASCII charset, and "œ" [339]. The highest code in the set is 255.
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.