> Good Morning, Is it possible to determine the length of UNICODE(UTF-8 or UTF- > 16) strings stored in SQLite 3.7.11 database?
> I just tried using the IBM open-source ICU function int32_t u_strlen(const > UCHAR* str) but it gives me erroneous? Evidently the u_strlen function for a > UTF-8 NULL (U+0000) terminated. > Is there a more accurate way to to determine the length of UNICODE(UTF-8 > or UTF-16) strings stored in SQLite 3.7.11 database? Thank you. Can you define your use of the word "length"? Do you mean "symbols" (which may take 1 to 4 bytes each), or do you mean "octets/bytes" as in the amount of storage you need to malloc to just fit the data? Should that include the trailing null(s) or not? Or do you mean some combination of the above? If you mean actual octetsconsumed exclusive of any trailing null(s), you could use length(cast(field as blob)) ... --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users