javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1422

Faces incorrectly renders astral plane characters (fails in firefox)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2_09
    • Fix Version/s: 2.0.next
    • Component/s: renderkit
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,422
    • Status Whiteboard:
      Hide

      size_medium importance_medium

      Show
      size_medium importance_medium

      Description

      -Create a simple jsf form page
      -enter some test data:
      You can copy a sample surrogate character from:
      http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%F0%A0%80%80

      Note: You must install surrogate font in your env to display the surrogate
      characters:
      http://winvnkey.sourceforge.net/webhelp/surrogate_fonts.htm

      In IE7, when we enter a surrogate character, then click submit button,
      surrogate character can be correctly displayed when page rendered.
      While in FF3, the surrogate character are displayed as 2 characters after
      clicked the submit button.

      [Analysis:]
      Check the html source of generated page, the surrogate character is written
      into 2 decimal value '��', and Firefox can't recognize these 2
      Decimal value as a single surrogate character.

      While in IE, it can recognize these 2 decimal value represent a single
      surrogate character.

      According to
      http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%F0%A0%80%80, the
      decimal value for this surrogate character is 131072, if in html source code,
      we write "𠀀" instead of '��', the surrogate character
      can display well in both IE7 and FF3.

        Activity

        Hide
        driscoll added a comment -

        Hard to say how difficult or easy this will be without seeing the code path, but
        the following link might help:

        http://java.sun.com/developer/technicalArticles/Intl/Supplementary/

        Show
        driscoll added a comment - Hard to say how difficult or easy this will be without seeing the code path, but the following link might help: http://java.sun.com/developer/technicalArticles/Intl/Supplementary/
        Hide
        driscoll added a comment -

        55360 is hex D840 and 56320 is hex DC00 - both of which are restricted areas in
        UTF-16, used for astral plane characters - so it's probably also a bug in
        Firefox: but Faces should try to work around this bug, if possible. It may be
        quite expensive, computationally, though (then again, it may not).

        Probably also worth checking on Safari and Chrome, as well. It probably fails
        there, too.

        Show
        driscoll added a comment - 55360 is hex D840 and 56320 is hex DC00 - both of which are restricted areas in UTF-16, used for astral plane characters - so it's probably also a bug in Firefox: but Faces should try to work around this bug, if possible. It may be quite expensive, computationally, though (then again, it may not). Probably also worth checking on Safari and Chrome, as well. It probably fails there, too.
        Hide
        driscoll added a comment -

        Take ownership.

        Show
        driscoll added a comment - Take ownership.
        Hide
        Ryan Lubke added a comment -

        Does setting the context init parameter com.sun.faces.disableUnicodeEscaping to
        false (this is assuming that the response content type is UTF-8 or similar)?

        Show
        Ryan Lubke added a comment - Does setting the context init parameter com.sun.faces.disableUnicodeEscaping to false (this is assuming that the response content type is UTF-8 or similar)?
        Hide
        Ed Burns added a comment -

        reassign to edburns

        Show
        Ed Burns added a comment - reassign to edburns
        Hide
        Manfred Riem added a comment -

        We recommend upgrading to the latest 2.1 release.

        Show
        Manfred Riem added a comment - We recommend upgrading to the latest 2.1 release.

          People

          • Assignee:
            Ed Burns
            Reporter:
            mwessendorf
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: