Package net.sf.saxon.charcode
Class BuggyCharacterSet
- java.lang.Object
-
- net.sf.saxon.charcode.BuggyCharacterSet
-
- All Implemented Interfaces:
CharacterSet
public class BuggyCharacterSet extends java.lang.Object implements CharacterSet
This class establishes properties of a character set that is known to the Java VM but not specifically known to Saxon. It avoids using the encoder.canEncode() method because there is a known bug (in JDK 1.4.2) that for some encodings, this returns true for every character. So this version of the class actually attempts to encode the characters, and catches the exception when it fails.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
inCharset(int c)
Determine if a character is present in the character setstatic BuggyCharacterSet
makeCharSet(java.nio.charset.Charset charset)
-
-
-
Method Detail
-
makeCharSet
public static BuggyCharacterSet makeCharSet(java.nio.charset.Charset charset)
-
inCharset
public final boolean inCharset(int c)
Description copied from interface:CharacterSet
Determine if a character is present in the character set- Specified by:
inCharset
in interfaceCharacterSet
-
-