v.25.9New Feature

New function, isValidASCII

A new function, isValidASCII. Returns 1 if the input string or FixedString contains only ASCII bytes (0x00–0x7F) else 0. Closes #85377. ... #85786 (rajat mohan).
Introduces the isValidASCII function that returns 1 if the input string or FixedString contains only ASCII bytes (0x00–0x7F), otherwise returns 0.

Why it matters

This feature allows users to quickly verify whether a string contains only valid ASCII characters, which is useful for data validation, filtering, and ensuring compatibility with ASCII-only systems.

How to use it

Use the function by passing a String or FixedString as an argument. The function will return 1 if all bytes are within the ASCII range, or 0 otherwise. Example:

SELECT isValidASCII('example') AS result;