DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31161>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31161 URLCodec.decode() corrupts characters > 127 in unencoded strings Summary: URLCodec.decode() corrupts characters > 127 in unencoded strings Product: Commons Version: 1.3 Final Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Codec AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If URLCodec.decode() is called with a String that contains unencoded characters in the 128-255 range, these characters are corrupted. The reason for this is in the way characters that don't need decoding are passed from the source to the target string: int b = bytes[i]; (...) buffer.write(b); If a character code is > 127, it results in integer b being in the -128..-1 range, and when it's lowest byte is written to the buffer it's something else than the original one. I think the fix would be to add 256 to b if b is less than zero. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
