Hi,
I'm trying to get this working:
my ($img) = $IN->param($field) =~ m|([^\\/]+)$|; # grab the i
+mage name...and then assign the path...
use Data::Dumper;
print "IMAGE BEFORE: " . Dumper($img);
$img =~ tr{ÀÂÄàâäÇçÉÊÈËéêèëÏÌÎïìîÖÔÒöôòÜÛÙüûùA-Z?!;«»()" }{aa
+aaaacceeeeeeeeiiiiiioooooouuuuuua-z__________};
print "IMAGE AFTER: " . Dumper($img);
print $IN->header;
print qq|XXX: $img,$table,$field,$id <Br />|;
..but it prints out:
00001Ëéêè_ÏÌÎï_whatever.jpg
....however, if I hard-code the $img with:
my $img = '00001ËéêèëÏÌÎï whatever.gif';
..it works fine, and returns:
00001eeeeeiiii_whatever.gif
Can anyone see why its not working for me? Been trying to figure it out for going on 2 hours now, and I'm stumped :(
Also, if I output it to STDERR - I see this in my log file:
00001ÃéêèëÃÃÃï whatever.jpg
Maybe its being converted for some reason, somehow?
TIA
Andy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.