2016-01-29 10:12 GMT+01:00 Richard Hipp <drh at sqlite.org>:
> On 1/29/16, Cecil Westerhof <cldwesterhof at gmail.com> wrote:
> > In H2 I can find records containing non-ascii characters with:
> > SELECT *
> > FROM <TABLE>
> > WHERE STRINGENCODE(<COLUMN>) LIKE '%\\u%'
> >
> > Is something like this also possible with SQLite?
>
> Perhaps something like this:
>
>
> ??
> SELECT * FROM <table>
> ??
> WHERE <column> GLOB ('*[^'||char(1,45,127)||']*');
>
I tried it and it looks like it works. But I do not understand how it
works. Could you enlighten me?
> Note, however, that the "*[" combination in a GLOB pattern in SQLite
> is inefficient. So the above might be slow for a large amount of text.
> Perhaps a better approach would be to create an application-defined
> function to do the search.
>
> SELECT * FROM <table> WHERE contains_non_ascii(<column>);
>
?I am working (in this case) with bash. That is not possible then I think.
Or is it?
At the moment I do not need it a lot, so probably not a big problem (yet).
--
Cecil Westerhof