@GetAsHTMLDecoded ( text )
HTML Character Entity Decoder
Average rating: 5.0 (5 votes) Log in to vote
Alex Zueiv - Show more from this author
Tashkent https://github.com/zueiv |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Recursive function for decoding HTML Character Entities.
This CF supports decimal and hexadecimal entity numbers of the whole Unicode table (x0…10FFFF). For compatibility with old systems, entity numbers in the range x80…9F are interpreted as in Windows-1252 (€‚ƒ\„…†‡ˆ‰ etc.)
The CF contains 1448 case-sensitive entity names with 583 synonyms from:
https://dev.w3.org/html5/html-author/charref
So, it is very large (>23K characters), which is yet a bit less than FMP allows (30K). In spite of the size it works quite fast – over 5К substitutions in less than a second.
Comments
JMLU Jul 8, 2020 |
||
I found it can't decode Chinese and Japanese. How do i modify it? Example: è§å…‰ %E8%8D%A7%E5%85%89 ガングリオシド %E3%82%AC%E3%83%B3%E3%82%B0%E3%83%AA%E3%82%AA%E3%82%B7%E3%83%89 |
||
Alex Zueiv, Tashkent Jul 8, 2020 |
||
It is not HTML, but URL (a.k.a. %) encoding. Use another function: https://www.briandunning.com/cf/2095 @GetAsURLDecoded ( "%E8%8D%A7%E5%85%89" ; 1 ) // ==> è§å…‰ |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.