UPPER function depends on Locale?

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

Re: [EXTERNAL] Re: UPPER function depends on Locale?

Hick Gunter
But there already is a step by step instruction document right here http://sqlite.org/loadext.html that tells you exactly how to build a loadable extension, which can contain user defined functions, complete with references to examples. I suggest you use compress.c as a template, as this has only about 60 lines of code (excluding comments) and implements two functions.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von Dr. Mucibirahman ILBUGA
Gesendet: Dienstag, 10. April 2018 09:49
An: [hidden email]
Betreff: [EXTERNAL] Re: [sqlite] UPPER function depends on Locale?

10.04.2018 10:30 tarihinde sandu yazdı:
> As Simon Slavin wrote, maybe in your case would be much easier to have
> dedicated lower/upper functions instead of recompiling with ICU
> option, if this is two complex for you.

Hi,

Yes. You and Simon are right. But in this case there is not any step by step document how to create function. If I can success to create one simple function in SQLite then I will prepare step by step how-to document. I swear... :)

--
Regards,
Mucip:)

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


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
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: [EXTERNAL] Re: UPPER function depends on Locale?

Dr. Mucibirahman İLBUĞA
10.04.2018 11:18 tarihinde Hick Gunter yazdı:
> But there already is a step by step instruction document right herehttp://sqlite.org/loadext.html  that tells you exactly how to build a loadable extension, which can contain user defined functions, complete with references to examples. I suggest you use compress.c as a template, as this has only about 60 lines of code (excluding comments) and implements two functions.

Dear Hick,

This is very good... :)

OK. I will check it and try to create my own function. Thanks... ;-)

I will share with you result and code...

--
Kolay gelsin,
Mucip:)

_______________________________________________
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: UPPER function depends on Locale?

Simon Slavin-3
In reply to this post by Dr. Mucibirahman İLBUĞA
On 10 Apr 2018, at 7:44am, Dr. Mucibirahman İLBUĞA <[hidden email]> wrote:

> I my opinion, there should be well documented, step by step information about how to add ICU support in SQLite.

I think that the reason this doesn't exist is that different people want to use different compilers.  But it would be nice to see instructions on how to do it with an example compiler.  If you choose to do this I will read your post with interest.

Simon.
_______________________________________________
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: UPPER function depends on Locale?

sandu
In reply to this post by Simon Slavin-3
Simon Slavin-3 wrote
> &lt;https://www.sqlite.org/src/artifact?ci=trunk&amp;filename=ext/icu/README.txt&gt;

However the example described here is a little bit simplistic:

        lower('I', 'en_us') -> 'i'
        lower('I', 'tr_tr') -> 'ı' (small dotless i)

You depend on the encoding of the text editor, which has to match encoding
of the SQLite database. A more realistic example would be:

lower((BLOB CAST AS TEXT), 'tr_tr')
where the BLOB hast to be the string in one of the supported encodings:
UTF8, UTF16, UTF16le, UTF16be.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
12