Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: UTF8 related proof of concept exploit released at T-DOSE

by graff (Chancellor)
on Oct 15, 2007 at 08:57 UTC ( #644867=note: print w/replies, xml ) Need Help??


in reply to Re^2: UTF8 related proof of concept exploit released at T-DOSE
in thread UTF8 related proof of concept exploit released at T-DOSE

Why go through that trouble if ":encoding(UTF-8)" does exactly the same thing, the same safe way, only with less code?

If it is sufficient that the app simply never gets to see a malformed byte sequence (or anything following a malformed character) when reading from a source that is expected to be utf8, you're right -- better to handle it via the ":encoding(utf8)" layer in PerlIO.

But if there's any need to diagnose the nature of the malformedness, or to recover any amount of usable data following a bad byte sequence within a given input record, then the extra steps involving "decode('utf8',$string,...)" are the only way to do that, I think.

  • Comment on Re^3: UTF8 related proof of concept exploit released at T-DOSE

Replies are listed 'Best First'.
Re^4: UTF8 related proof of concept exploit released at T-DOSE
by Juerd (Abbot) on Oct 15, 2007 at 16:09 UTC

    Using warnings takes care of most, but indeed if you want to catch it and do anything special with it, the extra step is the easiest way. Good point.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://644867]
help
Chatterbox?
[stevieb]: Joan Jett, Hendrix, Neil Young, Dave Keuning (The Killers)... I have my mind elsewhere so I'm limited in my capacity to think about this righ tnow ;)
[erix]: another blues with Big Red :)
[stonecolddevin]: I will say John Mayer is an excellent guitarist, I don't like his music but he's pretty damn good
[erix]: scd: maybe you like John Mayall better :)
[erix]: (mayall = british blues)
[planetscape]: sleep well, Corion
[stonecolddevin]: erix seems pretty good, i listened to "So Many Roads" and it was nice. Not everyone's cup of tea but this guy can absolutely shred, he and the guy from Mastodon are definitely up there: https://www. youtube.com/watch? v=VzhMkSN9dQc

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2017-06-22 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.