@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 - Show more from this author
Tashkent https://github.com/zueiv |
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
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.