HTOU( ) function

Converts a hexadecimal string to a Unicode string. Abbreviation for "Hexadecimal to Unicode".

Note

This function is specific to the Unicode edition of Analytics. It is not a supported function in the non-Unicode edition.

Syntax

HTOU(hex_string)

Parameters

Name Type Description
hex_string

character

The hexadecimal string to convert to a Unicode string. The string can only contain hexadecimal values, for example "20AC".

Output

Character.

Examples

Basic examples

Returns "ABC123":

HTOU("004100420043003100320033")

Advanced examples

Adding a currency symbol to a value

You need to extract a monetary field to a new table. The field should display the numeric Amount field's value and prepend it with a Euro currency symbol (€):

EXTRACT HTOU("20AC") + STRING(Amount, 10) AS "Currency_Amount" TO Display_Table

When the EXTRACT command runs, HTOU( ) returns the Euro symbol "€" and concatenates it with the Amount value that STRING( ) converts to a character. If the original value of Amount was 2000, then the value in Currency_Amount is "€2000".

Remarks

Related functions

HTOU( ) is the inverse of the DHEX( ) function, which converts a Unicode string to a hexadecimal string.