---
title: "unicode function in Strata | Oplema"
description: "Get the Unicode code point of the first character in text as an integer. Same as ord. Write it as unicode(string) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/unicode"
updated: "2026-11-04"
---

# unicode

Returns an INTEGER representing the unicode codepoint of the first character in the string.

Also available as ord.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/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.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \[226, 226, -1, NULL\] |

## Arguments and types

```
unicode(string)
```

**string**

Text

Supported signatures (1)

```
unicode(string: VARCHAR) → INTEGER
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Related functions

[ascii

Return the Unicode number of the first character in text.

](https://oplema.com/docs/strata/functions/ascii)[chr

Returns a character which corresponds to the ASCII code value or Unicode code point.

](https://oplema.com/docs/strata/functions/chr)[ilike\_escape

Check whether text matches a LIKE pattern, ignoring uppercase and lowercase. The escape character lets the pattern search for a literal % or \_.

](https://oplema.com/docs/strata/functions/ilike-escape)[instr

Find where a search string first appears in text, counting from 1. Returns 0 if there is no match.

](https://oplema.com/docs/strata/functions/instr)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#unicodestring)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
