FIX: Decode Raw UTF-16 data from Conn.getinfo() #340
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work Item / Issue Reference
Summary
This pull request introduces improvements to the handling of string encoding in the
getinfomethod for SQL Server connections, adds support for profiling builds in the Windows build script, and enhances test coverage for string decoding. The most important changes are grouped below:String Decoding Improvements
getinfomethod inconnection.pynow attempts to decode string results from SQL Server using multiple encodings in order: UTF-16LE (Windows default), UTF-8, and Latin-1. This improves robustness when handling driver responses and avoids silent data corruption by returningNoneif all decoding attempts fail.Test Coverage
test_getinfo_string_encoding_utf16intest_003_connection.pyto verify that string values returned bygetinfoare properly decoded from UTF-16, contain no null bytes, and are non-empty, helping catch encoding mismatches early.Build Script Cleanup
build.batrelated to copying themsvcp140.dllredistributable, simplifying the post-build process.