[ 
https://issues.apache.org/jira/browse/TRINIDAD-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13629797#comment-13629797
 ] 

Jeanne Waldman commented on TRINIDAD-2377:
------------------------------------------

Changed code from
        // only increase i if a valid surrogate code point is returned 
        if (Character.isSupplementaryCodePoint(surrogateCodePoint))
        {
        buffIndex =
            _writeDecRef(out, buff, buffIndex, surrogateCodePoint);

          i++;
        }
        else
        {
          throw new IllegalArgumentException(
            _LOG.getMessage("INVALID_SURROGATE_CHAR", new Object[] { ch, 
surrogateCodePoint, i }));
        }
to
        buffIndex =
            _writeDecRef(out, buff, buffIndex, surrogateCodePoint);
        // only increase i if a valid surrogate code point is returned 
        if (Character.isSupplementaryCodePoint(surrogateCodePoint))
        {
          i++;
        }
        else
        {
          // DO NOT BLOW UP. We have a bug in outputFormatted+surrogates, and 
we don't want to blow up.
          // blow up if invalid utf-16 characters encountered
          //throw new IllegalArgumentException(
          //  _LOG.getMessage("INVALID_SURROGATE_CHAR", new Object[] { ch, 
surrogateCodePoint, i }));
        }
                
> surrogate characters in outputFormatted throws IllegalArgumentException
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-2377
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2377
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>         Attachments: TRINIDAD-SurrogateOutputFormattedPatch.patch
>
>
> <af:outputFormatted value="#{TestInput.surrogateVal}" id="of1"/> 
> where
> TestInput.surrogateValue is a surrogateValue, like
>   private String surrogateVal = "\ud840\udc00";
>   public void setSurrogateVal(String surrogateVal) {
>       this.surrogateVal = surrogateVal;
>   }
>   public String getSurrogateVal() {
>       return surrogateVal;
> The page shows up blank, and you get an IllegalArgumentException from 
> HTMLEscapes. outputText works fine. This is a regression caused by 
> MYFACES-3690 Trinidad doesn't support surrogate characters

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to