Brian Dunning's FileMaker Custom Functions

Mac_to_ASCII ( text )

Translates any text encoded in Mac OS Roman to plain US-ASCII encoded text

  Average rating: 4.6 (25 votes) Log in to vote

Andreas Fischlin   Andreas Fischlin - Show more from this author
Systems Resilient
http://www.systems-resilient.com/sr/

Share on Facebook Share on Twitter

  Sample input:
Mac_to_ASCII ( "2° C is according to Krüger et al., 2009")
  Sample output:
2 degree C is according to Krueger et al., 2009

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

MacOS Roman characters above ordinal decimal number 127 up to 255 can not be encoded in US-ASCII. This routine nevertheless does that by matching the characters to an alternative character or if none exists to a small string, possibly enclosed blanks or with underscores. Ex.: Umlaute are translated from "Ü" to "Ue", "ä" to "ae", or accents are dropped, e.g. "é" to "e", or "°" is translated into " degree", or "¶" becomes "_EOL_". Of course some complicated cases, as the last example demonstrates, may not always look good, depending on circumstances. Feel free to edit this function accordingly. Note, this function attempts to translate ALL Mac OS Roman characters (for a definition of this character set see e.g. http://en.wikipedia.org/wiki/Mac_OS_Roman or http://www.alanwood.net/demos/macroman.html).

 

Comments

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 20 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: