Package EDU.purdue.jtb.common
Class UnicodeConverter
- java.lang.Object
-
- EDU.purdue.jtb.common.UnicodeConverter
-
public class UnicodeConverter extends java.lang.Object
ClassUnicodeConverter
contains some static methods to convert unicode chars into their escape sequence form (provided by James Huang from the JavaCC mailing list).Class is thread-safe.
TESTCASE some to add
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
addUnicodeEscapes(java.lang.String str)
Converts a string by replacing non ASCII characters with their Unicode representation.
ASCII characters are between 0x20 and 0x7e included, or tab, new line, carriage return? form feed and backspace.
Should be the same as (the commented)#convertString(String)
but comes from JavaCC.
-
-
-
Method Detail
-
addUnicodeEscapes
public static java.lang.String addUnicodeEscapes(java.lang.String str)
Converts a string by replacing non ASCII characters with their Unicode representation.
ASCII characters are between 0x20 and 0x7e included, or tab, new line, carriage return? form feed and backspace.
Should be the same as (the commented)#convertString(String)
but comes from JavaCC. CODEJAVA ?- Parameters:
str
- - a string- Returns:
- the converted string
-
-