fn:char emoji & entities names support in browser sources

About fn:char("ApplyFunction") with unicode/entities name as parameter.
HTML entity names are available in Blink-based browsers. Chrome including.
https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/core/html/parser/html_entity_names.csv
Those seems matching the HTML specs
https://html.spec.whatwg.org/multipage/named-characters.htmlThere is no
full Emoji listing [image: :cry:] in Chromium, just a range in Unicode.
But there is a 3823

emoji keywords and names to facilitate search in the Chrome OS emoji picker.

from CLDR (github
<https://github.com/unicode-org/cldr/blob/main/common/annotations/en.xml>)

With a given named character set it looks like the platform (Browser) can
provide useful support for fh:char() by the name. Name can be either entity
or emoji, total 6K names which is not a lot to be included into reference
implementation.*Reference implementation and guide for implementers*

   - *Character Names *data do not need to be loaded into memory
   immediately. While en-us localized names assumed by default, the other
   locale are available
   <https://github.com/unicode-org/cldr/tree/main/common/annotations> and
   can be loaded on demand by locale-sniffing algorithm.
   - Instead of managing the listing inside of implementation project, the
   3rd-party projects( Blink and CLDR) can be cross-linked as it is done in
   Chromium sources or pulled from revision in build time.

As Christian GrĂ¼n mentioned, the emoji and unicode/entity names
sometimes overlap with emoji names.  (e.g. ring or pound)
-s

Received on Tuesday, 17 January 2023 16:14:37 UTC