Brian Dunning's FileMaker Custom Functions

@CodeList ( text )

An expression for the Data Viewer to return a list of UTF-16 and UTF-32 character codes in Dec and Hex.

  Average rating: 5.0 (1 vote) Log in to vote

Alex Zueiv   Alex Zueiv - Show more from this author
Tashkent

Share on Facebook Share on Twitter

  Sample input:
@CodeList ( "1Aπ€€π€π€π €πŸ˜€" )
  Sample output:
00049 0x0031 "1"
00065 0x0041 "A"
55296 0xD800
56320 0xDC00 "𐀀" U+010000 0065536
55296 0xD800
56321 0xDC01 "𐀁" U+010001 0065537
55297 0xD801
56320 0xDC00 "𐐀" U+010400 0066560
55298 0xD802
56320 0xDC00 "𐠀" U+010800 0067584
55357 0xD83D
56832 0xDE00 "πŸ˜€" U+01F600 0128512

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

The calculation returns a list of UTF-16 codes for the passed characters. Additionally, for the characters above U+FFFF it returns their UTF-32 codes. The UTF-32 characters are returned after their UTF-16 Surrogate Pairs.

https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF (or see comments at the end of the function)

BTW, it uses an interesting technique of defining and evaluating sub-functions with parameters via $variables.

 

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