@@ -327,7 +327,7 @@ SQLRETURN BindParameters(SQLHANDLE hStmt, const py::list& params,
327327 std::string encodedStr;
328328
329329 if (py::isinstance<py::str>(param)) {
330- // Encode Unicode string using the specified encoding (like pyodbc does)
330+ // Encode Unicode string using the specified encoding
331331 try {
332332 py::object encoded = param.attr (" encode" )(charEncoding, " strict" );
333333 encodedStr = encoded.cast <std::string>();
@@ -1741,7 +1741,7 @@ SQLRETURN SQLExecute_wrap(const SqlHandlePtr statementHandle,
17411741 offset += len;
17421742 }
17431743 } else if (matchedInfo->paramCType == SQL_C_CHAR) {
1744- // Encode the string using the specified encoding (like pyodbc does)
1744+ // Encode the string using the specified encoding
17451745 std::string encodedStr;
17461746 try {
17471747 if (py::isinstance<py::str>(pyObj)) {
@@ -2043,7 +2043,7 @@ SQLRETURN BindParameterArray(SQLHANDLE hStmt, const py::list& columnwise_params,
20432043
20442044 if (py::isinstance<py::str>(columnValues[i])) {
20452045 // Use Python's codec system to encode the string with specified
2046- // encoding (like pyodbc does)
2046+ // encoding
20472047 try {
20482048 py::object encoded =
20492049 columnValues[i].attr (" encode" )(charEncoding, " strict" );
@@ -2836,7 +2836,7 @@ py::object FetchLobColumnData(SQLHSTMT hStmt, SQLUSMALLINT colIndex, SQLSMALLINT
28362836 return py::bytes (buffer.data (), buffer.size ());
28372837 }
28382838
2839- // For SQL_C_CHAR data, decode using the specified encoding (like pyodbc does)
2839+ // For SQL_C_CHAR data, decode using the specified encoding
28402840 // Create py::bytes once to avoid double allocation
28412841 py::bytes raw_bytes (buffer.data (), buffer.size ());
28422842 try {
@@ -2916,7 +2916,6 @@ SQLRETURN SQLGetData_wrap(SqlHandlePtr StatementHandle, SQLUSMALLINT colCount, p
29162916 if (numCharsInData < dataBuffer.size ()) {
29172917 // SQLGetData will null-terminate the data
29182918 // Use Python's codec system to decode bytes with specified encoding
2919- // (like pyodbc does)
29202919 // Create py::bytes once to avoid double allocation
29212920 py::bytes raw_bytes (reinterpret_cast <char *>(dataBuffer.data ()),
29222921 static_cast <size_t >(dataLen));
0 commit comments