Don't ask to ask, just ask | |
PerlMonks |
Re^6: Getting mad with CGI::Application and utf8by Juerd (Abbot) |
on Feb 27, 2008 at 10:39 UTC ( [id://670579]=note: print w/replies, xml ) | Need Help?? |
So as the average John Doe Perl hacker, what should I use to find out if a certain module or sub returns text strings or binary strings? Warning: culture shock ahead. From perlunifaq:
There is no way to determine whether a string is binary or text. Every operation (including your own subroutines) should handle a single mode: either text or binary. If you want to handle both kinds of string, and for any reason need to know the difference between bytes and characters with the same ordinal values, you will have to specify multiple routines, or a way to indicate that a certain string is binary rather than text. Just an advance warning: you may want to argue that this is as stupid concept, but eventually you'll have to accept that Perl just works like this. I personally think the model is well thought through. See also this journal post and the discussion tree that follows it. I plan to release a module called BLOB that lets you (and everyone else) flag a string as "this is binary, not text".
In Section
Seekers of Perl Wisdom
|
|