Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: CGI param character strangeness

by count0 (Friar)
on Feb 26, 2002 at 17:01 UTC ( #147646=note: print w/replies, xml ) Need Help??


in reply to CGI param character strangeness

The way those characters are displayed depends entirely upon the terminal settings / locale / charset, etc.

I don't see what's hosed about it though. Many of those hex values in the query string do not correspond to "normal" ascii printable characters, so you should expect some odd output when printing it to the terminal, or viewing the file to which it was been written. But while those values are still in your variable - after yanking them with param - they should still be fine. This is just a display issue.

If you're writing these to a file, perhaps it might be better to pack() the data, and write() it to the file, and later read() it when it's needed. Or even simply using binmode would suffice. (This keeps print from inserting any extra or different junk - normal text file laziness promotion ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://147646]
help
Chatterbox?
[Discipulus]: to specify use 5.0.x to be sure to have pairmap from the module..
[Corion]: Discipulus: I think Module::Corelist ( or corelist ) can tell you that
[Corion]: Meh - Module::CoreList
[choroba]: Just use List::Util 1.29
[choroba]: Be kind to people using old Perl with newer version of the module
[Corion]: But why not simply specify 'List::Util' => 1.29 in your prerequisites? People might install a more recent version of the module into their Perl
[Corion]: (what choroba said)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-05-25 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?