This page explains how to use the isascii function in APL.
isascii
function to check whether a string contains only ASCII characters. It returns true
if every character in the input string belongs to the ASCII character set (i.e., character codes 0–127) and false
otherwise.
The function is useful in scenarios where you want to detect non-ASCII text in logs, validate inputs for encoding compliance, or identify potential anomalies introduced by copy-pasted foreign characters or malformed input in user-submitted data.
Splunk SPL users
isascii
. To achieve similar functionality, you typically need to use match()
or custom regular expressions. In contrast, APL provides isascii
as a simple built-in function, making the check much more concise and performant.ANSI SQL users
isascii
function. You often need to simulate it using regular expressions or character code checks. APL simplifies this with the dedicated isascii
function.Name | Type | Description |
---|---|---|
value | string | The input string to check for ASCII content |
bool
value:
true
if all characters in value
are ASCII characters.false
if any character is outside the ASCII range.is_ascii_uri | count_ |
---|---|
true | 14250 |
false | 130 |
uri
field. These entries can indicate abnormal requests or encoding issues in log data.