diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1999-04-16 10:21:59 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1999-04-16 10:21:59 -0700 |
commit | c80eb46728381731106e0f54725cd1b8285c3a15 (patch) | |
tree | bab193f104bf2dbc0e341216454cac6908fcdeda /libjava/gnu | |
parent | d8b173bb572ca2c1939da19133756524f5fe3243 (diff) | |
download | gcc-c80eb46728381731106e0f54725cd1b8285c3a15.zip gcc-c80eb46728381731106e0f54725cd1b8285c3a15.tar.gz gcc-c80eb46728381731106e0f54725cd1b8285c3a15.tar.bz2 |
UnicodeToBytes.java (write(String,int,int,char[])): New overloading, allows greater efficiency.
�
* gnu/gcj/convert/UnicodeToBytes.java (write(String,int,int,char[])):
New overloading, allows greater efficiency.
* gnu/gcj/convert/Output_8859_1.java (write(String,int,int,char[])):
New overloading (for efficiency - avoids copying).
* gnu/gcj/convert/Output_UTF8.java: Fix typo: 0xC0 -> 0c3F.
* gnu/gcj/convert/Input_UTF8.java: Fix typos in bit masks.
From-SVN: r26493
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/gcj/convert/Output_UTF8.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/gnu/gcj/convert/Output_UTF8.java b/libjava/gnu/gcj/convert/Output_UTF8.java index 6be753b..db2215a 100644 --- a/libjava/gnu/gcj/convert/Output_UTF8.java +++ b/libjava/gnu/gcj/convert/Output_UTF8.java @@ -8,6 +8,12 @@ details. */ package gnu.gcj.convert; +/** + * Convert Unicode to UTF8. + * @author Per Bothner <bothner@cygnus.com> + * @date Match 1999. + */ + public class Output_UTF8 extends UnicodeToBytes { public String getName() { return "UTF8"; } @@ -48,7 +54,7 @@ public class Output_UTF8 extends UnicodeToBytes { bytes_todo--; buf[count++] = (byte) - (((value >> (bytes_todo * 6)) & 0xC0) | 0x80); + (((value >> (bytes_todo * 6)) & 0x3F) | 0x80); avail--; } while (bytes_todo > 0 && avail > 0); |