[SP-pm] Malformed UTF-8
Renato Santos
renato.cron at gmail.com
Mon Sep 20 20:10:31 PDT 2010
Tenta dar um use utf8 ( com o codigo utf8) e no open passar um
":encode(iso-8858-1o"
No open, utf8 = quirks mode, utf-8 eh strict.
Em set 21, 2010 12:00 AM, "breno" <breno at rio.pm.org>escreveu:
2010/9/20 Marcio Ferreira <marciodesouzaferreira at gmail.com>:
> só amanhã do trabalho, mas basicamente eu uso o XML::Bare para carregar o
> XML, faço um trim nos ...
O comando "perldoc perldiag" disse o seguinte sobre a causa do seu problema:
-----------------8<-----------------
Malformed UTF-8 character (%s)
(S utf8) (F) Perl detected a string that didn’t comply with UTF-8
encoding rules, even though it had the UTF8 flag on.
One possible cause is that you set the UTF8 flag yourself for data
that you thought to be in UTF-8 but it wasn’t (it was for example
legacy 8-bit data). To guard against this, you can use
Encode::decode_utf8.
If you use the ":encoding(UTF-8)" PerlIO layer for input, invalid
byte sequences are handled gracefully, but if you use ":utf8", the
flag is set without validating the data, possibly resulting in
this
error message.
See also "Handling Malformed Data" in Encode.
----------------->8-----------------
Mais que isso, acho que só olhando o seu código :-)
[]s
-b
_______________________________________________ SaoPaulo-pm mailing list
SaoPaulo-pm at pm.org http://m...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20100921/a1603b89/attachment.html>
More information about the SaoPaulo-pm
mailing list