On 23 June 2013 12:03, [email protected] <[email protected]> wrote: > I need to support MSSQL Server with proper Microsoft UNICODE usage (nvarchar > column etc.) from UCS2 to UTF8 and reverse, > cause MSSQL Server is the only one database engine, the is still not able to > store/retreive UTF8 (even if the actual server is 2012)! > My plan is to clone the ODBC backend and come up with a first version of a > new MSSQL interface. > Later on i would modifiy it to use the native client capabilities for better > performance. > This also will come up with conversation helper from UTF16 (UCS2) to UTF8 > and reverse. > > But there is a global issue doing so. I need the extends the core with > support of > > #define SQL_WCHAR (-8) > #define SQL_WVARCHAR (-9) > > with a new core data_type > > dt_wstring > > and exchanged to > > std::wstring. > > > Does somebody have had a problem doing so?
Generally, don't have any problem with supporting std::wstring as additional string type. Specifically, there are number of issues thet need to be consider: http://thread.gmane.org/gmane.comp.db.soci.user/397/focus=399 You may try to contact Sören Meyer-Eppler who seemed to be working on wstring long time ago: http://soci.6940.n7.nabble.com/SOCI-users-SOCI-unicode-again-td954.html#a955 Unfortunately, I don't have his patches. > I'm comming from the Windows world so any objections in terms of Unix world > are welcome upfront. > Should the support additionally enrolled to any other backend too if the > backend is able to support such types using std::wstring? Yes, it would be necessary, at least if into(wstring) or use(wstring) is used, those strings would have to be converted to UTF-8, I imagine. In any case, feel free to submit pull request (please, use dedicated branch), so anyone interested can help you with reviewing and testing. I hope others will chime in with helpful ideas. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
