security.HexBinary.ToStringWithCharset

Decodes an hexadecimal string to a clear, human-readable string, according to a given charset.

Syntax

security.HexBinary.ToStringWithCharset(
   source STRING,
   charset STRING )
  RETURNING result STRING
  1. source is a string in hexadecimal.
  2. charset is the character set to be used.
  3. result is a human readable string.

Usage

Decodes the given hexadecimal string and returns it in its clear human readable form, according to a given charset.

The original hexadecimal encoded string is first decoded to a string that will then be converted from the specified charset to the local DVM charset. In case of charset conversion error, the error -15700 is raised.

If the hexadecimal string does not contain a human readable string, the method will raise an exception.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).