>I try this function. Do you have Visual Studio. i show you my example. > >NOCaut wrote: > > > > > > char * unicode_to_1251(wchar_t *unicode_string)
Why are you converting Unicode to 1251? This is a lossy conversion in the general case. Work with Unicode strings end-to-end, using the UTF encoding of your choice. Since you're using Windows, UTF16-LE is the natural choice but you can still use UTF-8 as well of course. Note that this is for SQLite API interface only. Internally, SQLite will store text under the UTF setting which was used when creating the DB. By default, SQLite will create an UTF-8 DB but you can force UTF-16 _storage_ at creation time. After that you can use either the UTF-8 API functions or the UTF-16 versions and SQLite will perform the necessary conversion internally for you. At your application level, you probably want to use UTF16-LE (Windows) but you may have to convert external ANSI data sources (if any) like .CSV files or such into Unicode for DB storage. -- <mailto:j...@q-e-d.org>j...@antichoc.net _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users