Level: Any, Version: FM 12 or later

Unicode

Update 5 May 2014: article and demo have been updated as per observations by Jeremy Bante in the comments section.

This weekend I threw together a Unicode utility file (unicode-characters.zip). It takes the values 1 through 65535 and converts them into Unicode symbols, and makes it easy to copy characters and values into the clipboard.

5-5-2014 12-10-29 PM

(The original version of the demo had 99999 records, but as pointed out by Jeremy in the comments section below, the range 65537 – 99999 is a repeat of the range 1 – 34463, with 65536 being a special case.)

Any value over 99999 the Char function will interpret as multiple characters, and bear in mind that multiple values are interpreted a) from right to left, and b) in five digit blocks with leading zeros, except the leftmost one will not have leading zeros.

E.g., here’s how Code handles the letters “FMP”, singly and in combination:

code ex 1

And here are some ways we can produce “FMP” using the Char function, again bearing in mind the right to left orientation when you ask Char to interpret multiple values:

char ex 1

You can learn more about Unicode here:

6 thoughts on “Unicode”

  1. You don’t have to go all the way to 99,999. After 65,535, FileMaker wraps the codes back to zero again, so Code ( Char ( 65537 ) ) = 1. (Code ( Char ( 65536 ) ) should equal 0, but FileMaker doesn’t deal with the Null character very gracefully.) This hold up until 99,999, when FileMaker starts interpreting numbers with more than 5 digits as multiple characters.

  2. Would be handy to have also the hex value of the number. In MS Word you can use the hex value followed by Alt+X which results in the unicode character

    1. Hi Thibaud,

      I’m considering that, as well as a number of other improvements, for a possible v2. In the mean time, there are a number of custom functions to make the conversion painless on Brian Dunning’s web site, including this one from Jeremiah Small — http://www.briandunning.com/cf/216

      Regards,
      Kevin

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.