1 Dec 2004 15:26
Unicode (utf8) and MySQL (with Perl)
angie ahl <angie.ahl <at> gmail.com>
2004-12-01 14:26:29 GMT
2004-12-01 14:26:29 GMT
Hi List.
Please excuse the cross posting but I've been scouring the archives
and no joy as yet.
I'm trying to get Perl and MySQL using utf8 happily and I've followed
several tutorials but am not getting the same results.
I've got a load of utf8 characters like so (perl):
my %uni = (
hebrew_alef => {
character => chr(0x05d0),
language => "hebrew",
},
smiley => {
character => "\x{263a}",
language => "none",
},
);
I am inserting them into MySQL using the dbi module DBD::MySQL
The tutorial said to insert the values like this:
INSERT INTO unitest (id, aword) VALUES ( "smiley",
CONVERT(_utf8'\x{263a}' USING utf8) );
get the values back like this:
select aword from unitest where id = "smiley;"
(Continue reading)
RSS Feed