@DoNotObfuscate public class ConvertUnicodeToHex extends UtilityBase
The input file can be of any encoding, but you have to set the right encoding! For example, when the input file is of "UTF-8", you can use before executing this program from command-line:
set _JAVA_OPTIONS=-Dfile.encoding=UTF-8
The input string will be trimmed! When leading or trailing space are necessary, you have to add them later by hand.
The output file is written in the default encoding of the Java runtime.
The filename is derived from the input file automatically.
When you start the program without parameters, a message will show you the commandline parameters.
EMPTY_STRING, OUTPUT_PATH
Constructor and Description |
---|
ConvertUnicodeToHex(java.lang.String[] args)
Converts Unicode string with the non-ASCII characters into their corresponding
Unicode hex-code ("€" for the Euro character).
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(java.lang.String[] args) |
static void |
main(java.lang.String[] args)
Converts Unicode string with the non-ASCII characters into their corresponding
Unicode hex-code ("€" for the Euro character).
|
protected void |
parseArguments(java.lang.String[] args) |
appendTrailingSlash, assertIsDirectory, checkArguments, createSourceBaseName, createUTF8Writer, isDirectory, showUsage, writeToFile
public ConvertUnicodeToHex(java.lang.String[] args) throws java.lang.Exception
args
- args[0] input-file, args[1] destination-directory, args[2] passwordjava.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
The program does not use static fields, so you can invoke main() multiple times from a batch (unit tests).
args
- args[0] input-file, args[1] destination-directory, args[2] passwordjava.lang.Exception
protected void checkArguments(java.lang.String[] args) throws PDFUnitInvalidProgramInvokeException
checkArguments
in class UtilityBase
PDFUnitInvalidProgramInvokeException
protected void parseArguments(java.lang.String[] args) throws PDFUnitInvalidProgramInvokeException
parseArguments
in class UtilityBase
PDFUnitInvalidProgramInvokeException
Copyright (C) PDFUnit.com. See here for license.