#!/usr/bin/perl use strict; use warnings; use Search::Tools::UTF8; use String::UTF8 qw(:all); my $text = 'There are those of you out there stuck with Latin-1.'; print my $str = is_utf8($text), "\n", #check if well-formed is_valid_utf8($text), "\n", is_ascii($text), "\n", looks_like_cp1252($text), "\n"; #### 1 1 1 0