Function is_latin1

The function is a shortcut for is_encoding(‘Some characters’, ‘LATIN1’), you don’t have to give the target encoding.

Examples

SELECT is_latin1('Some characters') AS res;

Result:

res
t
SELECT is_latin1('Some characters, ğ is Turkish and not latin1') AS res;
-- Returns false: The Turkish character ğ is not part of latin1

Result:

res
f