[JDEV] utf8
Glen
jdev at empireenterprises.com
Thu Dec 4 16:08:12 CST 2003
So how and where do you set this utf flag? Before or after the encoding
conversion?
It's irrelevant; that's my point - it serves no good purpose
whatsoever. You can set the flag even on a string that's not utf8
compliant. Regarding utf8 for jabber, I just had to make sure the
content was in fact utf8 before I sent it.
-g
On Thu, 2003-12-04 at 14:25, Jeremy Nickurak wrote:
> 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?
More information about the JDev
mailing list