From 380931f5a6c007fbadf7cee003c900bc9e705ccf Mon Sep 17 00:00:00 2001 From: ulvii Date: Mon, 12 Dec 2016 17:52:50 -0800 Subject: [PATCH] Replcaing SQLSRV_ENCODING ( CP_UTF8) with SQLSRV_ENCODING_UTF8 --- pdo_sqlsrv/core_results.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdo_sqlsrv/core_results.cpp b/pdo_sqlsrv/core_results.cpp index 7fde182c..91f05a11 100644 --- a/pdo_sqlsrv/core_results.cpp +++ b/pdo_sqlsrv/core_results.cpp @@ -346,7 +346,7 @@ sqlsrv_buffered_result_set::sqlsrv_buffered_result_set( sqlsrv_stmt* stmt TSRMLS else { // If encoding is set to UTF-8, the following types are not necessarily column size. // We need to call SQLGetData with c_type SQL_C_WCHAR and set the size accordingly. - if ( encoding == SQLSRV_ENCODING( CP_UTF8 )) { + if ( encoding == SQLSRV_ENCODING_UTF8 ) { meta[i].length *= sizeof( WCHAR ); meta[i].length += sizeof( SQLULEN ) + sizeof( WCHAR ); // length plus null terminator space offset += meta[i].length; @@ -445,7 +445,7 @@ sqlsrv_buffered_result_set::sqlsrv_buffered_result_set( sqlsrv_stmt* stmt TSRMLS case SQL_LONGVARCHAR: // If encoding is set to UTF-8, the following types are not necessarily column size. // We need to call SQLGetData with c_type SQL_C_WCHAR and set the size accordingly. - if ( encoding == SQLSRV_ENCODING( CP_UTF8 )) { + if ( encoding == SQLSRV_ENCODING_UTF8 ) { meta[i].c_type = SQL_C_WCHAR; } else {