Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303018

Unicode Emoji Properties

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 21
    • None
    • core-libs
    • b15

    Description

      Unicode Emoji code points are becoming more important and support for rendering these is increasingly widespread.

      As well as the rendering, Unicode defines various properties for these such as
      whether the default presentation is greyscale (traditional glyphs) or color image.
      Unicode variation selectors may be used by text to indicate they want the non-default presentation.

      Presently java.lang.Character provides no property information related to Emoji.
      You cannot query even if it is an Emoji per Unicode, even though the CLDR data
      included in the JDK sources could be used to create APIs exposing this and the presentation.

      See https://www.unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt

      and https://unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
      Property Abbr Property Values
      Emoji Emoji =Yes for characters that are emoji
      Emoji_Presentation EPres =Yes for characters that have emoji presentation by default

      There are more properties than this .. but this would be a good start.

      It is requested that API be added to java.lang.Character to expose this information (and other appropriate Unicode properties for Emoji).
      JDK rendering code can then make the proper decision for the version of Unicode supported by the same JDK

      I expect it will also be useful for non-rendering code which needs to classify text.

      Attachments

        Issue Links

          Activity

            People

              naoto Naoto Sato
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: