On 26 Nov 2010, at 6:52am, Niklas Bäckman wrote:

> You are right of course. The shell should not count code points, but 
> graphemes.
> 
> http://unicode.org/faq/char_combmark.html#7
> 
> I guess that this probably falls out of the "lite" scope of SQLITE though?

There is absolutely no way you're going to get graphemes into the SQLite 
library until the SQLite library is written to support Unicode in other ways 
(which it currently doesn't).

The command-line tool could possibly have grapheme-counting added to it, 
though.  The 'lite' in 'SQLite' only has to refer to the routines people need 
to compile into their applications; there's no need to keep an external tool 
slim.

> Or would it be possible to write such a graphemelen(s) function in not too 
> many
> lines of C code without needing any external Unicode libraries?

No.  Sorry, but Unicode was not designed to make it simple to figure out such a 
function.  You need lots of data to figure out how the compound characters work.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to