Class UnicodeConverter

java.lang.Object
EDU.purdue.jtb.common.UnicodeConverter

public class UnicodeConverter extends Object
Class UnicodeConverter 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

    Modifier and Type
    Method
    Description
    static String
    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)
    invalid reference
    #convertString(String)
    but comes from JavaCC.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • addUnicodeEscapes

      public static String addUnicodeEscapes(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)
      invalid reference
      #convertString(String)
      but comes from JavaCC. CODEJAVA ?
      Parameters:
      str - - a string
      Returns:
      the converted string