On Mon, 2006-03-06 at 04:44 +0100, Dalibor Topic wrote:
> Hi all,
>
> I've added a small path to fix a bug with file connection's handling of
> unquoting unicode characters outside of basic plane. I forgot to update
> the position in the buffer in my first patch, so the attached patch
> fixes that.
>
> cheers,
> dalibor topic
>
> 2006-03-06 Dalibor Topic <[EMAIL PROTECTED]>
>
> * gnu/java/net/protocol/file/Connection.java (unquote):
> Update position in buffer after decoding a unicode character
> outside of the basic plane.
>
>
Index: gnu/java/net/protocol/file/Connection.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/net/protocol/file/Connection.java,v
retrieving revision 1.19
diff -u -r1.19 Connection.java
--- gnu/java/net/protocol/file/Connection.java 12 Feb 2006 19:25:46 -0000 1.19
+++ gnu/java/net/protocol/file/Connection.java 6 Mar 2006 02:14:08 -0000
@@ -160,7 +160,9 @@
else if (c > 127) {
try {
byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
- System.arraycopy(c_as_bytes, 0, buf, pos, c_as_bytes.length);
+ final int c_length = c_as_bytes.length;
+ System.arraycopy(c_as_bytes, 0, buf, pos, c_length);
+ pos += c_length;
}
catch (java.io.UnsupportedEncodingException x2) {
throw (Error) new InternalError().initCause(x2);