Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-07-24 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls