http://kbinstuff.googlepages.com/perl%2Cunicodeutf8%2Ccgi.pm%2Capache%2Cmod_perla
I hope you will find it useful and please provide me with feedback.
--Kalle
my $dbh = DBI->connect( <parameters>);
$dbh->do( "SET NAMES utf8");
In other word is not needed to use UTF8DBI. On most webhosting servers user
cannot to install his/her own modules and this module is not installed. In
addition MySQL server (daemon) is running in default configuration (collate
Swedish, charset latin-1) :-)
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
> Good idea to sumarize possible problems - good page.
> I can mention only that you can use this too
>
> my $dbh = DBI->connect( <parameters>);
> $dbh->do( "SET NAMES utf8");
That by itself won't guarantee that your data will be correctly
handled. DBD::mysql provides the mysql_enable_utf8 option for a
reason. You do need at least DBD::mysql 4.004 for it to work more or
less correctly, though.
To the original poster: don't worry too much about the experimental
status of the option. It might some day go away (IMO not very likely,
though) but it's the best method today for getting reasonable unicode
behaviour out of DBD::mysql. At worst, you may have to remove the option
some time in the future, but the behaviour it enables is likely to stay.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Nice work. There are still some issues with straight DBD::mysql, even
using the lastest versions and using the enable_utf8 option. I've made
some remarks on that in reply to this post on perlmonks:
http://perlmonks.org/?node_id=620803
The most important bug/missing feature still outstanding is:
http://rt.cpan.org/Public/Bug/Display.html?id=25590
Basically, this means that data inserted into UTF8 columns *must* be
utf-8 encoded (note that you *must not* encode non-UTF8 column
data!). See the perlmonks link for more info.