"Mahalakshmi.m" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I will call this loop 2 times for inserting 2 records at run time.
Which part of "the exact code" is difficult to understand? Can you post the code that I can copy, paste, compile, run and see the results for myself? You omitted the most interesting part - how you prepare the data to be inserted. I have reasons to believe this is precisely where your problems lie. > memcpy(st_SQLITE_DB_Record.s8_ArtistName,tmp_str,strlen(tmp_str)*sizeof( > short)); strlen counts the number of char (bytes) to the nearest NUL byte, not the number of Unicode characters. You multiply this count by two, thus copying up to the NUL byte and then again as much. This doesn't look right regardless of what's in tmp_str (which you chose not to show, by the way). > u16_SearchResult=sqlite3_column_text16(insert,0); > printf(u16_SearchResult); The first parameter of printf is a char*, it expects a narrow string. It doesn't know how to print a Unicode string. You would just see garbage where each byte (each half of a Unicode codepoint) is interpreted and printed as a character in its own right. -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users