Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Malformed UTF-8 character

by Stegalex (Chaplain)
on Nov 19, 2002 at 22:51 UTC ( #214292=perlquestion: print w/replies, xml ) Need Help??

Stegalex has asked for the wisdom of the Perl Monks concerning the following question:

I just upgraded my server to RH Linux 8.0 with perl 5.8.0 and all of a sudden many of my "stable" scripts are producing the following message:
Malformed UTF-8 character (unexpected continuation byte 0x99, with no +preceding start byte) in substitution iterator at...".
It seems to happen in scripts where I am doing a
use Date::Manip qw(ParseDate UnixDate);
wherein I am only using parts of a module. Any ideas?

~~~~~~~~~~~~~~~
I like chicken.

Replies are listed 'Best First'.
Re: Malformed UTF-8 character
by graff (Chancellor) on Nov 20, 2002 at 02:05 UTC
    You should check the 5.8.0 man pages "utf", "perlunicode", and probably "perluniintro" as well.

    Given that you're migrating older scripts for things that have nothing to do with using unicode data, it should suffice to put:

    no utf8;
    near the top of each script (e.g. above "use Date::Manip").

    I just added Date::Manip to my 5.8.0 installation and tried a couple of sample operations from the man page, involving the two methods you mentioned. No problem. Is there any chance that your Date::Manip.pm file is actually a layover from an older perl version -- that is, after installing 5.8.0, did you reinstall Date::Manip?

    Apart from that, I don't know what to say... maybe if you put up a minimal script that generates the problem for you, and we'll have something more concrete to work with.

      I don't think it's anything wrong with Date::Manip, but rather somethine wrong with RedHat 8.0. I have perl 5.8.0 on my solaris box and it doesn't have a problem with my Date::Manip scripts. But my desktop with RH8 does.

      I started a bug on redhat's bugzilla: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74884

Re: Malformed UTF-8 character
by jmcnamara (Monsignor) on Nov 20, 2002 at 10:01 UTC

    There seems to be related to the Unicode issues highlighted in Problems with RedHat 8 from a recent perl5 porters summary.

    --
    John.

      Maybe that explains why I didn't see a problem -- I was on SuSE linux.
Re: Malformed UTF-8 character
by Notromda (Pilgrim) on Nov 21, 2002 at 16:03 UTC
    I have run into all sorts of problems related to this. The environment variable: $LANG is set to en_US.UTF-8. Many programs do not know how to use this; nedit seg faults, Net::Ldap hangs, as I discovered earlier. I changed all my $LANG environment variables to simply en_US, and all seems to be good again. I would like to see a better solution, though.
      Using use bytes; helped quiet the noise for my Solaris setup.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://214292]
Approved by beretboy
Front-paged by jarich
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-07-28 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?