Bug #67495 [NEW]: pdo_dblib incorrectly escapes binary and unicode values

From: Date: Sun, 22 Jun 2014 20:49:09 +0000
Subject: Bug #67495 [NEW]: pdo_dblib incorrectly escapes binary and unicode values
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186291@lists.php.net to get a copy of this message
From: vytas dot LT at gmail dot com Operating system: PHP version: 5.6Git-2014-06-22 (Git) Package: PDO DBlib Bug Type: Bug Bug description:pdo_dblib incorrectly escapes binary and unicode values Description: ------------ For storing unicode text MSSQL has nchar and nvarchar column types However, pdo_dblib extension does not correctly escapes unicode strings. Those strings must be prefixed with N prefix - e.g. INSERT INTO table(field) (N'unicode_value') UPDATE table SET field = N'unicode_value' WHERE code = N'unicode_value' Likewise binary, varbinary and blob should be escaped like unquoted hexadamical notation starting with 0x - e. g. INSERT INTO table(binfield) (0xAAFFCC) UPDATE table SET binfield = 0xAAFFCC WHERE code = 0xCCAAFF -- Edit bug report at https://bugs.php.net/bug.php?id=67495&edit=1 --

« previous php.bugs (#186291) next »