-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Wide Strings in SOCI for Enhanced Unicode Handling #1133
base: master
Are you sure you want to change the base?
Conversation
Converting from UTF-16 to UTF-8 is no problem when retrieving data, because the column data type is known. I'm thinking of adding another argument to "soci::use()" that lets the developer override the data type that's used for the underlying ODBC call. Another issue is the currently non-existing N'' enclosure for unicode strings for MSSQL in case of soci::use(). Another issue is the stream interface. Currently std::wstring isn't supported and as far as I understand, supporting it would require widening the query to UTF-16 before sending it to the DB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This globally looks good but there are globally 2 issues:
- The new functionality needs to be documented, notably it should be clearly stated that
wstring
andwchar_t
are only supported in the ODBC backend (and only when using SQL Server?). - The use of/checks for C++17 are confusing as it's not clear if it is required for wide char support or if it's just some kind of optimization (in the latter case I'd drop it, it's not worth the extra code complexity).
…hub.com/ORDIS-Co-Ltd/soci into wstring_support_with_unicode_conversion
This pull request adds support for wide strings (
wchar_t
,std::wstring
) to the SOCI database library, improving its interaction with Unicode string types such as SQL Server'sNVARCHAR
andNTEXT
.Key Changes:
exchange_type_traits
andexchange_traits
specializations for wide string handling.Notes: