ASCIISTR
The ASCIISTR
function takes as its argument, either a string or any expression that resolves to a string, in any character set, and returns the ASCII version of the string in the database character set. Non-ASCII characters are converted to Unicode escapes.
SQL syntax
ASCIISTR ([N]'String
')
Parameters
ASCIISTR
has the parameter:
Parameter | Description |
---|---|
|
The string or expression that evaluates to a string that is passed to the |
Description
The ASCIISTR
function enables you to see the representation of a string value that is not in the database character set.
Examples
The following example invokes the ASCIISTR
function passing as an argument the string 'Aäa'
in UTF-16 format. The ASCII version is returned in the WE8ISO8859P1
character set. The non-ASCII character ä
is converted to Unicode encoding value:
Command> connect "dsn=test; ConnectionCharacterSet= WE8ISO8859P1"; Connection successful: DSN=test;UID=user1;DataStore=/datastore/user1/test; DatabaseCharacterSet=WE8ISO8859P1; ConnectionCharacterSet=WE8ISO8859P1;PermSize=32; (Default setting AutoCommit=1) Command> SELECT ASCIISTR (n'Aäa') FROM dual; < A\00E4a > 1 row found.