[kaffe] Re: Characters and Bytes conversion
Ito Kazumitsu
kaz at maczuka.gcd.org
Tue Jan 13 06:57:04 PST 2004
>>>>> ":" == Ito Kazumitsu <kaz at maczuka.gcd.org> writes:
:> (1) For an encoding name XXX that can be a Java class name,
:> CharToByteXXX or ByteToCharXXX is tried first and if
:> there is no such class, then iconv is tried.
:>
:> Isn't it better to have a way to directly call iconv
:> without trying CharToByteXXX or ByteToCharXXX?
Current CharToByteConverter and ByteToCharConverter do so.
:> (2) We are merging GNU Classpath's classes into kaffe. If
:> kaffe's java.io.InputStreamReader and the like are to
:> be replaced by GNU Classpath's, a good characters and
:> bytes conversion mechanism must be implemented in GNU
:> Classpath.
I experimentally imported GNU Classpath's java.io.InputStreamReader
and java.io.OutputStreamWriter and the result was successful.
This is what I did.
1. Copy the following files from GNU Classpath and use them as they are.
gnu/java/io/encode/Encoder.java
gnu/java/io/decode/Decoder.java
2. Copy the following file from GNU Classpath and modify it for
use with kaffe.
gnu/java/io/EncodingManager.java
3. Copy the following files from GNU Classpath and change the
package name from "java.io" to "javatest.io".
java/io/InputStreamReader.java
java/io/OutputStreamWriter.java
4. Make the following new files.
gnu/java/io/encode/KaffeEncoder.java
gnu/java/io/decode/KaffeDecoder.java
5. Make a test program.
TestKaffeEncoding.java
Attached are these files.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestKaffeEncoding.tar.gz
Type: application/octet-stream
Size: 9243 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20040113/00c1db3c/attachment-0002.obj
More information about the kaffe
mailing list