LJ::is_utf8 — check text for UTF-8 validity
LJ::is_utf8(text);
LJ::is_utf8
text. text to check for UTF-8 validity
cgi-bin/ljlib.pl
1 if text is a valid UTF-8 stream, 0 otherwise.