public class WindowsHackReader extends EncodingReader
The windows "smart" quotes actually do map into unicode characters. If that's what you want, use the window-1521 encoding instead. windows-hack converts to the closest latin-1 equivalent.
The three exceptions are the elipses '...', the trademark, and the per-mille characters. Those are translated into their unicode equivalents because there isn't a useful latin-1 equivalent.
| Constructor and Description |
|---|
WindowsHackReader()
Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Reader |
create(java.io.InputStream is,
java.lang.String javaEncoding)
Create a windows-hack reader based on the readStream.
|
int |
read()
Reads into a character buffer using the correct encoding.
|
int |
read(char[] cbuf,
int off,
int len)
Reads into a character buffer using the correct encoding.
|
close, create, getJavaEncoding, setJavaEncodingpublic WindowsHackReader()
public java.io.Reader create(java.io.InputStream is,
java.lang.String javaEncoding)
create in class EncodingReaderis - the input stream providing the bytes.javaEncoding - the JDK name for the encoding.public int read()
throws java.io.IOException
read in class EncodingReaderjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class EncodingReadercbuf - character buffer receiving the data.off - starting offset into the buffer.len - number of characters to read.java.io.IOException