using lower function with utf8

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using lower function with utf8

curmudgeon

I was messing about with this and tried the following in sqlite expert professional

select unicode(lower(char(256)));

I was quite surprised when it responded with the correct result 257.

Looking at the sqlite3.c code I can’t see anything that suggests sqlite would handle lower() for non-ascii characters so I tried the same thing in a c programme and it came back with the expected wrong answer 256.

Am I right in saying 256 is the expected sqlite answer?

Can anyone suggest why it works in the former?

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: using lower function with utf8

Jean-Christophe Deschamps-3

>I was messing about with this and tried the following in sqlite expert
>professional
>
>select unicode(lower(char(256)));
>
>I was quite surprised when it responded with the correct result 257.
>
>Looking at the sqlite3.c code I can’t see anything that suggests
>sqlite would handle lower() for non-ascii characters so I tried the
>same thing in a c programme and it came back with the expected wrong
>answer 256.
>
>Am I right in saying 256 is the expected sqlite answer?
>
>Can anyone suggest why it works in the former?

Expert v5 (I expect that's what you use) includes Unicode support and
overrides sqlite3.dll lower().

JcD

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: using lower function with utf8

curmudgeon
In reply to this post by curmudgeon
Yes, I’m using v5 JcD. Thanks.



________________________________
From: sqlite-users <[hidden email]> on behalf of Jean-Christophe Deschamps <[hidden email]>
Sent: Thursday, September 19, 2019 3:49:39 PM
To: SQLite mailing list <[hidden email]>
Subject: Re: [sqlite] using lower function with utf8


>I was messing about with this and tried the following in sqlite expert
>professional
>
>select unicode(lower(char(256)));
>
>I was quite surprised when it responded with the correct result 257.
>
>Looking at the sqlite3.c code I can’t see anything that suggests
>sqlite would handle lower() for non-ascii characters so I tried the
>same thing in a c programme and it came back with the expected wrong
>answer 256.
>
>Am I right in saying 256 is the expected sqlite answer?
>
>Can anyone suggest why it works in the former?

Expert v5 (I expect that's what you use) includes Unicode support and
overrides sqlite3.dll lower().

JcD

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users