Hello all, Stephan Austermühle schrieb:
$st->execute("s\x{c3bc}\x{c39f}")Same problem: Colum stays empty. :-(
... but feeding DBI with a UCS-2LE encoded string works:
$st->execute("\x73\x00\xFC\x00\xDF\x00") || croak("Cannot INSERT");
Result:
1 Gänz vüle Ümläute und ßeugs
61 süß
Looks like one layer (DBI, DBD::ODBC, unixODBC, FreeTDS) does not detect that the passed string is UTF-8 and needs to be converted
to UCS-2LE. I got there by enabling ODBC tracing:
[ODBC][23542][1254292559.858042][SQLDriverConnectW.c][286]
Entry:
Connection = 0x9923f0
Window Hdl = (nil)
Str In =
[DSN=XXX;MARS_Connection=Yes;UID=XXX;PWD=XXX;][length = 46]
Str Out = 0x7fff26adbaf0
Str Out Max = 512
Str Out Ptr = 0x7fff26adc30e
Completion = 0
UNICODE Using encoding ASCII 'utf-8' and UNICODE
'UCS-2LE'
Does anybody have an idea on how to enable automatic character set conversion?
By the way, UTF-16 != UCS-2LE?
Thanks,
Stephan
smime.p7s
Description: S/MIME Cryptographic Signature
