| java.lang.Object org.mmbase.util.transformers.ReaderTransformer org.mmbase.util.transformers.ConfigurableReaderTransformer org.mmbase.util.transformers.CP1252Surrogator
CP1252Surrogator | public class CP1252Surrogator extends ConfigurableReaderTransformer implements CharTransformer(Code) | | Surrogates the Windows CP1252 characters which are not valid ISO-8859-1. It can also repair
wrongly encoded Strings (byte arrays which were actually CP1252, but were considered ISO-8859-1
when they were made to a Java String).
author: Michiel Meeuwissen since: MMBase-1.7.2 version: $Id: CP1252Surrogator.java,v 1.6 2007/02/24 21:57:50 nklasens Exp $ |
WELL_ENCODED | final public static int WELL_ENCODED(Code) | | |
WRONG_ENCODED | final public static int WRONG_ENCODED(Code) | | |
CP1252Surrogator | public CP1252Surrogator()(Code) | | |
CP1252Surrogator | public CP1252Surrogator(int conf)(Code) | | |
getTestBytes | public static byte[] getTestBytes()(Code) | | |
main | public static void main(String[] args)(Code) | | For testing only.
Use on a UTF-8 terminal:
java -Dfile.encoding=UTF-8 org.mmbase.util.transformers.CP1252Surrogator
Or, on a ISO-8859-1 terminal: (you will see question marks, for the CP1252 chars)
java -Dfile.encoding=ISO-8859-1 org.mmbase.util.transformers.CP1252Surrogator
Or, if - may God forbid - you have a CP1252 terminal:
java -Dfile.encoding=CP1252 org.mmbase.util.transformers.CP1252Surrogator
This last thing you may simulate with something like this:
java -Dfile.encoding=CP1252 org.mmbase.util.transformers.CP1252Surrogator | konwert cp1252-utf8
|
Fields inherited from org.mmbase.util.transformers.ConfigurableReaderTransformer | protected int to(Code)(Java Doc)
|
|
|