DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4878>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4878

XSPUtil.formEncode doesn't convert non-ascii character as is should

           Summary: XSPUtil.formEncode doesn't convert non-ascii character
                    as is should
           Product: Cocoon 2
           Version: 2.0rc2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In the static method XSPUtil.formEncode() the conversion of 
non ascii characters to a url compatible hex representation 
is broken. The line of code in the method looks like this: 

  String hex = Integer.toHexString((byte)c[i]).toUpperCase();

The casting to byte breaks the encoding. So the immediate bug 
fix looks like this:

  String hex = Integer.toHexString(c[i]).toUpperCase();

But I assume that the reason for the casting to byte lies in making sure that 
the resulting hex number has only 2 digits as defined by the rfc describing urls. 
Anyway, I do not understand, why you do not use java.net.URL.encode instead of 
XSPUtil.formEncode()

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to