My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 29: URIError when URI component is not propertly UTF-8 encoded in URI class
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by philoQE, Jul 30, 2007
What steps will reproduce the problem?

Add this code to URITest.as in corelib:

public function testUnescapingUnencodedChars() : void

            {

                  var s:String = "http://test.com/&&!%~ +=";

                  assertTrue(URI.unescapeChars(s) == s);

            }



What is the expected output? What do you see instead?

Brian comments: "The problem is in corelib's com.adobe.net.URI class. 
Specifically, URI.unescapeChars calls the global decodeURIComponent, which 
throws a URIError because the URI component is not properly UTF-8 encoded. 
A reasonable solution is to put the call to decodeURIComponent within a 
try-catch block and return the passed-in value if the call throws, perhaps 
parametrize this with a throwIfIllegal param, which the URI getters should 
set to false." 


What version of the product are you using? On what operating system?
corelib-90.zip, Windows XP

Please provide any additional information below.


Sign in to add a comment

Hosted by Google Code