* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26493
138bc75d-0d04-0410-961f-
82ee72b054a4
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"; }
{
bytes_todo--;
buf[count++] = (byte)
- (((value >> (bytes_todo * 6)) & 0xC0) | 0x80);
+ (((value >> (bytes_todo * 6)) & 0x3F) | 0x80);
avail--;
}
while (bytes_todo > 0 && avail > 0);