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

charCodeAt function added to java.lang.String doesn't behave as native String function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 8
    • core-libs
    • None

      Test case attached. An incomplete UTF-16 (thumbs up emoticon) is used to create a String.

      - getting charCodeAt on the JS instance returns the surrogate, that is expected.
      - getting charCodeAt on the Java instance returns 0xFFFD. This is the way Java String codePointAt is behaving.

      Both function should return the surrogate.


            attila Attila Szegedi
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: