MySQL Forums
Forum List  »  Perl

Error sending UTF8 to MySQL unexpected non-continuation byte 0x5c
Posted by: san san
Date: October 03, 2006 07:41AM

OK, I'm rewording this under a new title

What am I doing wrong, why can't I send UTF8 data to MySQL without getting a unexpected non-continuation byte 0x5c error?

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 46.\r, referer:

:(

I'm using Win XP Home SP2, MySQL 5.022-communiy-nt, Active State Perl 5.8.7, Apache Apache/2.0.54 (Win32) and i have all setting set to UTF8



Edited 3 time(s). Last edit at 10/03/2006 07:55AM by san san.

Options: ReplyQuote


Subject
Written By
Posted
Error sending UTF8 to MySQL unexpected non-continuation byte 0x5c
October 03, 2006 07:41AM


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.