Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Problems with packing upper ASCII - differences across perl versions

by John M. Dlugosz (Monsignor)
on Nov 29, 2002 at 17:40 UTC ( #216567=note: print w/replies, xml ) Need Help??


in reply to Problems with packing upper ASCII - differences across perl versions

From the error in your reply, it looks like the input is not in UTF8 format at all, but an 8-bit character set. I think you are trying to escape out Latin-1. We covered this in a thread a couple days ago.

Your Unicode behavior is going to see bytes or chars in split, and that's what's different between 5.6 and 5.8.

Try using foreach my $char (unpack ("C*", $foo)) (I think that's the right unpack syntax) to force byte seperation of the input, regardless of how the string is tagged (byte or utf8). Then use the if statement you have now as the body of the loop.

  • Comment on Re: Problems with packing upper ASCII - differences across perl versions
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://216567]
help
Chatterbox?
[Discipulus]: M4ver1k are you debug/dump vars in the loops? are you sure you are not quitting the loop earlier?
[Corion]: A good weekstart to everybody!

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2017-11-20 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (285 votes). Check out past polls.

    Notices?