mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-12-19 19:53:28 +08:00
Postgres-style ILIKE operator (with Unicode support) (#244)
Access's `LIKE` is actually case-insensitive, but to prevent breaking existing programs that rely on mdbtools' case-sensitive behavior, introduce a new `ILIKE` operator to perform a case-insensitive match. Use GLib's `g_utf8_casefold` to make the comparison UTF-8 aware. A "poor man's" version is implemented in fakeglib, which relies on `towlower`, and won't work with multi-grapheme case transformations (e.g. German Eszett). Fixes #233
This commit is contained in:
@@ -144,6 +144,7 @@ void g_printerr(const gchar *format, ...);
|
||||
gint g_unichar_to_utf8(gunichar c, gchar *dst);
|
||||
gchar *g_locale_to_utf8(const gchar *opsysstring, size_t len,
|
||||
size_t *bytes_read, size_t *bytes_written, GError **error);
|
||||
gchar *g_utf8_casefold(const gchar *str, gssize len);
|
||||
gchar *g_utf8_strdown(const gchar *str, gssize len);
|
||||
|
||||
/* GString */
|
||||
|
||||
Reference in New Issue
Block a user