Package org.owasp.encoder
Class Unicode
- java.lang.Object
-
- org.owasp.encoder.Unicode
-
final class Unicode extends java.lang.Object
ASCII and Unicode constants.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static char
DEL
ASCII "DEL" character.(package private) static char
LINE_SEPARATOR
Unicode line separator character, must be encoded in some contexts.(package private) static char
MAX_ASCII
Highest ASCII (usually) valid ASCII char.(package private) static char
MAX_C1_CTRL_CHAR
Highest C1 control character.(package private) static char
NEL
"Next Line" C1 control character.(package private) static int
NON_CHAR_MASK
Bit-mask for Unicode non-characaters (XXfffe and XXffff).(package private) static char
PARAGRAPH_SEPARATOR
Unicode paragraph separator character, must be encoded in some contexts.
-
Constructor Summary
Constructors Modifier Constructor Description private
Unicode()
No instances.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
isNonCharacter(int cp)
Returns true if the argument is not a character according to the Unicode standard.
-
-
-
Field Detail
-
MAX_ASCII
static final char MAX_ASCII
Highest ASCII (usually) valid ASCII char.- See Also:
- Constant Field Values
-
DEL
static final char DEL
ASCII "DEL" character.- See Also:
- Constant Field Values
-
NEL
static final char NEL
"Next Line" C1 control character.- See Also:
- Constant Field Values
-
MAX_C1_CTRL_CHAR
static final char MAX_C1_CTRL_CHAR
Highest C1 control character.- See Also:
- Constant Field Values
-
LINE_SEPARATOR
static final char LINE_SEPARATOR
Unicode line separator character, must be encoded in some contexts.- See Also:
- Constant Field Values
-
PARAGRAPH_SEPARATOR
static final char PARAGRAPH_SEPARATOR
Unicode paragraph separator character, must be encoded in some contexts.- See Also:
- Constant Field Values
-
NON_CHAR_MASK
static final int NON_CHAR_MASK
Bit-mask for Unicode non-characaters (XXfffe and XXffff).- See Also:
- Constant Field Values
-
-
Method Detail
-
isNonCharacter
static boolean isNonCharacter(int cp)
Returns true if the argument is not a character according to the Unicode standard. Non-characters have the format XXfffe and XXffff, where XX is any code plane, and "fffe/ffff" is the low 16-bits in hex.- Parameters:
cp
- the unicode code-point to check- Returns:
- true if
cp
is not a character.
-
-