From: "Dr.Ruud" <rvtol+news@isolution.nl>
Message-ID: <
20080823081032.32162.qmail@lists.develooper.com>
p4raw-id: //depot/perl@34223
For example,
use Encode 'decode_utf8';
- eval { decode_utf8($string, Encode::FB_CROAK) };
- if ($@) {
+
+ if (eval { decode_utf8($string, Encode::FB_CROAK); 1 }) {
# $string is valid utf8
} else {
# $string is not valid utf8