Case-insentive comparison of strings containing non-ascii characters
19:22 24 Mar 2026

I'm probably wasting my time considering how to protect users from corrupting their database by manipulating it external to the application it supports; but ...

I validate some data within the user interface code in a case-insensitive manner before it is passed to Tcl or SQLite. If a user types non-ascii characters then SQLite cannot validate a nocase scenario unless compiled together with the ICU extension. I don't really understand the ICU extension, not just how to compile it but how to employ it thereafter.

How does Tcl string equal -nocase evaluate strings having non-ascii characters? Is it broad enough that a user-defined function might be added as a constraint when creating a table or in an insert trigger, if I don't know what language the user may be typing? Or is the only option the ICU extension.

Thank you.

tcl string-comparison