MySQL Forums
Forum List  »  Perl

Re: Help can remote SELECT but not INSERT
Posted by: san san
Date: September 19, 2006 07:21AM

OK, I've figured out its a problem moving UTF-8 from Perl to MySQL...

use utf8;
use Encode;
use DBI;

... DBI login ...

binmode STDOOUT,":utf8";
$command = 'INSERT test (test) VALUES ("test2")';
print $command;
$data = $DataHandle->do ($command);

=

INSERT test (test) VALUES ("test2")

=

[Tue Sep 19 14:16:48 2006] [error] [client 192.168.0.14] Malformed UTF-8 character (unexpected non-continuation byte 0x5c, immediately after start byte 0xe0) in regexp compilation at C:/Program Files/Apache Group/Apache2/cgi-bin/utf8/test.pl line 420.\r, referer:
...
[Tue Sep 19 14:16:48 2006] [error] [client 192.168.0.14] DBD::mysql::db do failed: MySQL server has gone away at C:/Program Files/Apache Group/Apache2/cgi-bin/utf8/test.pl line 1686.\r, referer:

:(

so ok how do i move UTF8 from perl to MySQL without getting this error?



Edited 6 time(s). Last edit at 09/19/2006 08:04AM by san san.

Options: ReplyQuote


Subject
Written By
Posted
September 16, 2006 07:49AM
Re: Help can remote SELECT but not INSERT
September 19, 2006 07:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.