ascii()

Scalar. Returns the Unicode code point for a particular character, or the UTF-8 code point if the -U server option is specified.

Syntax

ascii ( character )

Parameters

character

A character string.

Usage

If empty or NULL, the function returns NULL. Otherwise, the function returns the code point as an integer.

Example

ascii ('D') returns 68.

ascii ('Dog') also returns 68 since only the first character is converted.