On Fri, Nov 27, 2015 at 12:03 PM, Igor Korot <ikorot01 at gmail.com> wrote:
> Hi, guys. > But what about Linux/Mac? > Can I use that function there? > It will always give you a UTF-16 encoded string as a void*. To get it into a wstring would involve extracting the 16 bit code points and possibly converting them to 32 bit code points depending on the platform. Perhaps at this point the question should be asked "why do you need a wstring"? The answer to that question might help figure out how your needs might be best met. Portability covers an entire spectrum of needs. At one end of the spectrum you know you have ASCII or Latin-1 bytes and conversion to wchar_t is trivial. At the other you have zero knowledge of the character encodings in use or the platforms to be targeted so the answer is "no, it is not possible to do it portably". SDR > > Thank you. > On Nov 27, 2015 9:54 AM, "Dominique Devienne" <ddevienne at gmail.com> wrote: > > > On Fri, Nov 27, 2015 at 2:45 PM, OBones <obones at free.fr> wrote: > > > > > Dominique Devienne wrote: > > > > > >> That's UTF-16, while a wstring is expected to be in the current locale > > >> (which won't be UTF-16 on Windows). > > >> > > > Excuse me, but the std::wstring type is based on wchar and has no > > codepage > > > assigned to it. > > > And under windows, that's the standard type to use to talk to the W > > suffix > > > APIs, thus giving them the UTF-16 that they are expecting. > > > > > > > Apologies to Dan, and thank you OBones for setting the record straight. I > > was wrong, -1 to me. --DD > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users at mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- Scott Robison