[JDEV] utf8
Jeremy Nickurak
atrus at jabber.spam.rifetech.com
Thu Dec 4 13:25:14 CST 2003
On Thu, 2003-12-04 at 09:48, Glen wrote:
> As it turns out, perl will use utf8 by default in it's strings; however,
> there is a utf8 "flag" on each variable that is not turned on by
> default.
>
> I was using the _is_utf8 function in the Encode module to test whether
> the string was utf8, but this only checks for the flag, which has to be
> explicitly set. >:(
>
> Basically, since I'm getting my content through LWP, I'm checking the
> content for the character set. I search for /charset=UTF8/, if it
> doesn't exist, I convert to UTF8 using the Encode module:
>
> use Encode qw(encode);
> my $string = encode("utf", $string);
So how and where do you set this utf flag? Before or after the encoding
conversion?
--
Jeremy Nickurak -= Email/Jabber: atrus at rifetech.com =-
I would rather spend 10 hours reading someone else's source code than
10 minutes listening to Musak waiting for technical support which isn't.
-- Dr. Greg Wettstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.jabber.org/jdev/attachments/20031204/94edcc7f/attachment-0002.pgp>
More information about the JDev
mailing list