|
-
October 14th, 2009, 12:26 PM
#5
Re: Writing UNICODE CString to SQLServer UCS-2
First you should decide what column type to use and in what encoding to store the strings.
http://msdn.microsoft.com/en-us/libr...SQL.90%29.aspx
On Windows, with SQL Server, n[var]char is what you should probably use.
To convert text from a particular codepage, or UTF8 via CP_UTF8, use the following:
Code:
CStringW wide = CA2WEX<>(cp_text, cp);
Where cp_text is a char* string which is encoded with the given codepage identifier, cp.
>> How do I write this to an sql server database?
How are you doing it now?
gg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|