There's more than one way to do things | |
PerlMonks |
restore unicode data from database?by ph0enix (Friar) |
on Nov 29, 2002 at 14:29 UTC ( [id://216530]=perlquestion: print w/replies, xml ) | Need Help?? |
ph0enix has asked for the wisdom of the Perl Monks concerning the following question: Hi all I'm using Tie::RDBM with postgresql to store some data. My problem is that the values obrained back from the database does not have set unicode (utf8) flag and are treated as a octets instead of strings. Yes, of course I can use $data = decode('utf8', $hash{'key'}) for each data (both keys and values) obtained from database, but... Is there better way to do this? Is there something like DBM filers (filter_fetch_key, filter_fetch_value)? My testing code is here
Thanks for your help
Back to
Seekers of Perl Wisdom
|
|