So I have been walking home from the bar the same way for the past 15 years, and last night I heard some voices with a strange accent in the dark, definitely some kind of foreigners, I heard äöÜÖëãñÑÕß and who knows what else, but then they certainly spoke English when they demanded I hand over my wallet.
So now I join all of you who have also been mugged by foreign accents and I realize that something MUST BE DONE about this menace!!
Seriously, I used to be able to walk home like this:
return $sth->fetchall_arrayref({ });
But now I have to take a ridiculous detour like this if I want to be safe:
my $rows = $sth->fetchall_arrayref({ });
for my $row (@{$rows}) {
foreach my $key (keys %{$row}) {
if ($row->{$key}) {
$row->{$key} = Encode::encode_utf8( $row->{$key} );
}
}
}
return $rows;
This CANNOT be the right way to deal with this problem, we are using PERL, you know, do the right thing?!
Every piece of data that comes and goes CANNOT have to be processed, I just can't accept that this is how things have to be now.
And yes, my MySQL handle uses
mysql_enable_utf8 => 1.
How can it be like this? Are accents a relatively new thing for PERL programmers?
Vexed.
Tosh
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.