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. Jeremy

    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.

    Reply
  2. Thibaud

    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

    Reply
    1. Kevin Frank Post author

      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

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s