public static class
UnicodeTranscode.Options
Optional attributes for UnicodeTranscode
Public Methods
UnicodeTranscode.Options |
errors(String errors)
|
UnicodeTranscode.Options |
replaceControlCharacters(Boolean replaceControlCharacters)
|
UnicodeTranscode.Options |
replacementChar(Long replacementChar)
|
Inherited Methods
Public Methods
public UnicodeTranscode.Options errors (String errors)
Parameters
errors | Error handling policy when there is invalid formatting found in the input. The value of 'strict' will cause the operation to produce a InvalidArgument error on any invalid input formatting. A value of 'replace' (the default) will cause the operation to replace any invalid formatting in the input with the `replacement_char` codepoint. A value of 'ignore' will cause the operation to skip any invalid formatting in the input and produce no corresponding output character. |
---|
public UnicodeTranscode.Options replaceControlCharacters (Boolean replaceControlCharacters)
Parameters
replaceControlCharacters | Whether to replace the C0 control characters (00-1F) with the `replacement_char`. Default is false. |
---|
public UnicodeTranscode.Options replacementChar (Long replacementChar)
Parameters
replacementChar | The replacement character codepoint to be used in place of any invalid
formatting in the input when `errors='replace'`. Any valid unicode codepoint may
be used. The default value is the default unicode replacement character is
0xFFFD or U+65533.)
Note that for UTF-8, passing a replacement character expressible in 1 byte, such as ' ', will preserve string alignment to the source since invalid bytes will be replaced with a 1-byte replacement. For UTF-16-BE and UTF-16-LE, any 1 or 2 byte replacement character will preserve byte alignment to the source. |
---|