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 {