[gatein-issues] [JBoss JIRA] (GTNCOMMON-24) FastURLDecoder cannot decode surrogate pair characters

Takayuki Konishi (JIRA) issues at jboss.org
Thu Jun 5 22:12:15 EDT 2014


     [ https://issues.jboss.org/browse/GTNCOMMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Takayuki Konishi updated GTNCOMMON-24:
--------------------------------------

    Description: 
FastURLDecoder cannot decode surrogate pair characters.

When I decoded [U+20000B|http://www.fileformat.info/info/unicode/char/2000B/index.htm], I got MalformedInputException:
{code}
org.gatein.common.text.MalformedInputException: Cannot decode char 'A0'
	at org.gatein.common.text.FastURLDecoder.safeEncode(FastURLDecoder.java:217)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:45)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:62)
	at org.gatein.common.text.FastURLDecoderTestCase.testEncodeSurrogatePair(FastURLDecoderTestCase.java:159)
{code}
I also attach a patch for testcase.

  was:
FastURLDecoder cannot decode surrogate pair characters.

When I decoded U+20000B, I got MalformedInputException:
{code}
org.gatein.common.text.MalformedInputException: Cannot decode char 'A0'
	at org.gatein.common.text.FastURLDecoder.safeEncode(FastURLDecoder.java:217)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:45)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:62)
	at org.gatein.common.text.FastURLDecoderTestCase.testEncodeSurrogatePair(FastURLDecoderTestCase.java:159)
{code}
I also attach a patch for testcase.



> FastURLDecoder cannot decode surrogate pair characters
> ------------------------------------------------------
>
>                 Key: GTNCOMMON-24
>                 URL: https://issues.jboss.org/browse/GTNCOMMON-24
>             Project: GateIn Common
>          Issue Type: Bug
>            Reporter: Takayuki Konishi
>         Attachments: surrogatepairtest.patch
>
>
> FastURLDecoder cannot decode surrogate pair characters.
> When I decoded [U+20000B|http://www.fileformat.info/info/unicode/char/2000B/index.htm], I got MalformedInputException:
> {code}
> org.gatein.common.text.MalformedInputException: Cannot decode char 'A0'
> 	at org.gatein.common.text.FastURLDecoder.safeEncode(FastURLDecoder.java:217)
> 	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:45)
> 	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:62)
> 	at org.gatein.common.text.FastURLDecoderTestCase.testEncodeSurrogatePair(FastURLDecoderTestCase.java:159)
> {code}
> I also attach a patch for testcase.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the gatein-issues mailing list