eginners@perl.org
Sent: Wednesday, January 03, 2007 5:46 PM
Subject: Re: detecting a UTF-8 string
2007/1/3, Octavian Rasnita <[EMAIL PROTECTED]>:
Hi,
I want to check if a certain string is UTF-8 or not.
Maybe you want Encode::Guess[1].
[1] http://search.cpan.org/~dankogai/
On 1/3/07, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
From: "Jay Savage" <[EMAIL PROTECTED]>
> Try to unpack the data--or a chunk of data you feel is large enough to
> be representative--with the pattern U0U*. If the unpack succeeds with
> no warnings, you have valid utf8. You could try the same
From: "Jay Savage" <[EMAIL PROTECTED]>
Try to unpack the data--or a chunk of data you feel is large enough to
be representative--with the pattern U0U*. If the unpack succeeds with
no warnings, you have valid utf8. You could try the same thing with
Encode's 'decode_utf8' routine. See perluniintro
2007/1/3, Octavian Rasnita <[EMAIL PROTECTED]>:
Hi,
I want to check if a certain string is UTF-8 or not.
Maybe you want Encode::Guess[1].
[1] http://search.cpan.org/~dankogai/Encode-2.18/lib/Encode/Guess.pm
--
Igor Sutton Lopes <[EMAIL PROTECTED]>
On 1/3/07, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
Hi,
I want to check if a certain string is UTF-8 or not.
I have tried using is_utf8 from the Encode module, and utf8::is_utf8() but
the string is detected wrong.
For example, if I have a UTF-8 encoded file and an ANSI encoded file, if I
op