perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Boggio <embp...@thefreecat.org>
Subject Re: AW: Getting mad with UTF-8
Date Wed, 03 Jul 2013 16:21:19 GMT
Gerald,

Le 03/07/2013 17:47, Gerald Richter - ECOS a écrit :
> sorry for the late reply.

No problem.

> Perl utf8 flag does NOT says that your data is utf8 or not. It tell
> us something about the internal representation of your data inside of
> Perl.

I agree with that.

> So utf8 data can have the utf8 set, but it need not, also everything
> is alright.

But isn't it what causes my problem ? Data comes as UTF-8 but is not
"seen" by perl as such. So it gets re-encoded.
That's how I understand it.

> It might help to access your %fdat data via $data =
> Encode::decode_utf8 ($fdat{foo}) ;

Yes but I'd have to do it everywhere %fdat is concerned.

> Decode_utf8 will convert the utf8 data (that Embperl delivers) to the
> correct  internal representation. I will fix this in a further
> release Hope this helps

I guess that will solve many things.

I have read many docs about UTF-8 but am still confused. I still don't
understand what decode_utf8 *really* does. For example, what happens if
you do it twice ? Like :

$fdat{foo} = decode_utf8 ( decode_utf8 ($fdat{foo}) );

Will it decode it once and then see it's already UTF-8 (because it has 
the utf8 flag set) and don't do it a second time ?

Also, I still don't understand why I seem to be the only one having
problems with UTF-8 :-)

Thanks for taking care of this issue.

Best regards,

JC

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message