Hello all, Martin Evans schrieb:
> Don't think that is going to make any real difference - still think
> you'd be best starting with the freeTDS mailing list.
I have looked in the FreeTDS mailing list archived and read that the CVS
release has progressed with the Unicode things. In fact, everything seems to
work with unixODBC/CVS + FreeTDS/CVS (0.83.dev.20091001):
$st = $dbh->prepare(q/INSERT INTO foo (name) VALUES (?)/);
$st->bind_param(1, "German and Polish special characters: ä ö ü Ä Ö Ü ß
é è ń ł", DBI::SQL_WVARCHAR);
$st->execute() || croak("Cannot INSERT");
$dbh->commit();
$st = $dbh->prepare(q/SELECT id, name FROM foo/);
$st->execute() || croak("Cannot SELECT");
while (my $r = $st->fetchrow_hashref()) {
printf("%3d %s\n", $r->{'id'}, $r->{'name'});
}
Result:
1 Gänz vüle Ümläute und ßeugs
109 German and Polish special characters: ä ö ü Ä Ö Ü ß é è ń ł
Works also without explicitly specifying the data type:
$st->execute("Blödsinn ó ù á €") || croak("Cannot INSERT");
In both cases I haven't set odbc_default_bind_type.
Don't know if really everything is working fine but it looks like it works for
me. Now that both unixODBC and FreeTDS are unreleased versions I will have to
plan some additional tests...
Regards,
Stephan
smime.p7s
Description: S/MIME Cryptographic Signature
