I was under the impression you wanted to achieve this:
asql> select hex('abc' || X'10FFFD');
hex('abc' || X'10FFFD')
-----------------------
61626310FFFD
asql> select length('abc' || X'10FFFD');
length('abc' || X'10FFFD')
--------------------------
6
asql> select typeof('abc' || X'10FFFD');
typeof('abc' || X'10FFFD')
--------------------------
text
-----Ursprüngliche Nachricht-----
Von: Dominique Devienne [mailto:[email protected]]
Gesendet: Mittwoch, 14. Mai 2014 09:28
An: General Discussion of SQLite Database
Betreff: Re: [sqlite] LIKE operator and collations
On Wed, May 14, 2014 at 8:30 AM, Hick Gunter <[email protected]> wrote:
> Actually SQLite does support X'xxxx...' literals for creating blobs.
Note sure how that's relevant Hick. We don't need a blob, but a integer for
char(). I was obviously talking about *number* literals (prefixed with 0b, 0,
0x for binary / octal / hexa), not blob literals.
I'd be +1 to having char() also accept blobs (1 to 3 bytes long) instead of
integer, since x'10FFFD' is closer to U+10FFFD than 1114109 is.
But Dr. Hipp would need to agree with that. Until then, 1114109 it must be. --DD
C:\Users\DDevienne>sqlite3
SQLite version 3.8.4.3 2014-04-03 16:53:12 Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> select char(x'10FFFD');
sqlite> select typeof(char(x'10FFFD'));
text
sqlite> select length(char(x'10FFFD'));
0
sqlite>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
-----------------------------------------------------------------------
Gunter Hick
Software Engineer
Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna,
Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: [email protected]
This e-mail is confidential and may well also be legally privileged. If you
have received it in error, you are on notice as to its status and accordingly
please notify us immediately by reply e-mail and then
delete this message from your system. Please do not copy it or use it for any
purposes, or disclose its contents to any person as to do so could be a breach
of confidence. Thank you for your cooperation.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users