Hello,
I'm trying to use $dbh->quote with a UTF string, and I'm not having
luck. How can I get it to return a UTF8 string?
Here is my example:
#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect("DBI:mysql:mysql", "root", "");
my $string = "test äñèé";
utf8::upgrade($string);
my $sqlutfstring = $dbh->quote($string);
print qq~
<html>
<head>
<meta http-equiv="content-type"
content="text/html;charset=utf8">
<title>UTF Quote Test</title>
</head>
<body>
~;
print $string . " == " . $sqlutfstring;
print qq~
</body>
</html>
~;