---
schema_version: "1"
id: 83ba4cd8b3c188d3b7742d210af969fbc4ab758d5419f6ef88a80762c681a99a
title: ascii()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-functions-string-ascii.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-ascii.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3123e8521e83e383d4b7562f71dc437e0a45e1f538ce6c16ed23f10996c63446
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# ascii()

Returns the UTF-8 code value of a character _n_.

## Syntax

`ascii`(_n_)

## Usage

Returns `null` if _n_ is `null`. The `null` character (0) is not allowed.

## Example

```nolang
q = foreach q generate ascii("a") as int_value;
- -int_value == 97
```
