|Don't ask to ask, just ask|
Mysterious null-paddingby belg4mit (Prior)
|on Jan 27, 2016 at 21:48 UTC||Need Help??|
belg4mit has asked for the wisdom of the Perl Monks concerning the following question:
I'm updating a LONGBINARY column in a Jet 4 (MDB) database on Windows with DBD::ODBC and have encountered an odd issue. Data that should look like:
Ends up being inserted like this:
i.e; there is a null byte inserted between each legitimate byte of data. This seems similar maybe to an issue discussed here
When I enable some DBI tracing $DBH->trace($DBH->parse_trace_flags('SQL|odbcconnection|2|odbcunicode')); I get the following:
Most material out there on Unicode issues with databases seem to be with people having character data treated as bytes, whereas I seem to be in the opposite predicament.
I've also tried utf8::downgrade and explicitly setting the encoding to UCS-2LE to no avail. DBI::data_string_desc returns "UTF8 off, non-ASCII"
Any assistance would be much appreciated.
UPDATE: I have the problem whether I use the default DBD::ODBC from Strawberry Perl, or one built specifically with Unicode disabled.