unicode
Returns an INTEGER representing the unicode codepoint of the first character in the string.
Also available as ord.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
[unicode('âbcd'), unicode('â'), unicode(''), unicode(NULL)]Result
'[226, 226, -1, NULL]'The expression returns INTEGER[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
unicode(string)- string
- Text
Supported signatures (1)
unicode(string: VARCHAR) → INTEGERThe result type can depend on the input types. See DuckDB for the full argument rules.
Function metadata from DuckDB, used under the MIT license.