Re: [sqlite] proposal for write-lock on "commit" rather than "begin transaction"

2019-11-11 Thread Rowan Worth
On Sat, 26 Oct 2019 at 00:07, Brannon King wrote: > This is a request for a small change to the handling of multiple > connections. I think it would significantly enhance the usefulness there > via allowing multiple "views" of the data. > > Consider that I have two simultaneous connections to

Re: [sqlite] Why does Python turn UTF8 data in SQLite into Latin1?

2019-11-11 Thread Keith Medcalf
What version of Python and what Operating System, and what is the locale applicable to the process instance? -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On >Behalf Of

Re: [sqlite] Why does Python turn UTF8 data in SQLite into Latin1?

2019-11-11 Thread Keith Medcalf
Yes you did. What version of Python are you using? -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On >Behalf Of Winfried >Sent: Monday, 11 November, 2019 17:42 >To:

[sqlite] Why does Python turn UTF8 data in SQLite into Latin1?

2019-11-11 Thread Winfried
Hello, For some reason, the following script turns UTF8 data in SQLite into Latin1: == import sqlite3 """ OK! sqlite3 mydb.sqlite .output check.from.sqlite.txt select * from table1; """ testoutput = open("check.from.Python.txt", "w") con = sqlite3.connect('mydb.sqlite')

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jens Alfke
> On Nov 11, 2019, at 11:09 AM, Jose Isaias Cabrera wrote: > > Compared to me, you are a genius in everything, but you just lack a little > bit of understanding about other languages and their localization behavior. > As a Technical Project Manager for 12 years on my last job, all of these

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Keith Medcalf
On Monday, 11 November, 2019 14:34, Richard Damon wrote: >Unicode has decreed that the highest code-point that can be called a >code-point is 0x10 because to go higher breaks UTF-16, so there >isn't as much room as you might think. >This give us 1,114,112 possible code points. >There are

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 2:57 PM, Jose Isaias Cabrera wrote: > Igor Tandetnik, on Monday, November 11, 2019 02:24 PM, wrote... >> On 11/11/2019 12:50 PM, Richard Damon wrote: >>> Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the >>> screen. >> Or more, depending on what you mean by

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Tom Browder
On Mon, Nov 11, 2019 at 15:28 Tom Browder wrote: > See the entry point for the language at . > Oh, and there are Debian packages available, too. -Tom ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Tom Browder
On Mon, Nov 11, 2019 at 15:18 Richard Damon wrote: > On 11/11/19 3:49 PM, Jose Isaias Cabrera wrote: > > Richard Damon, on Monday, November 11, 2019 02:37 PM, wrote... > > Aaaah, my apologies. We are talking about different things. You are > talking about a combination of Unicodes vs. full,

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 3:49 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 02:37 PM, wrote... > >> No. > Aaaah, my apologies. We are talking about different things. You are talking > about a combination of Unicodes vs. full, character. I take it back. Yes, if > you are

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Warren Young
On Nov 11, 2019, at 1:49 PM, Jose Isaias Cabrera wrote: > > If there is a combination, is just like the accented e, é, why not use the > one character vs the combination? Big “if.” There isn’t always a pre-composed character. Typically, pre-composed characters exist in Unicode for

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Igor Tandetnik, on Monday, November 11, 2019 02:56 PM, wrote... > > On 11/11/2019 12:30 PM, Jose Isaias Cabrera wrote: > > > > Igor Tandetnik, on Monday, November 11, 2019 11:02 AM, wrote... > >>> Most people have to figure out what Unicode they are using, count the > >>> bytes, divide > >>>

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Richard Damon, on Monday, November 11, 2019 02:37 PM, wrote... > > No. Aaaah, my apologies. We are talking about different things. You are talking about a combination of Unicodes vs. full, character. I take it back. Yes, if you are combining these, then, of course, you are going to have to

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Igor Tandetnik
On 11/11/2019 2:56 PM, Igor Tandetnik wrote: On 11/11/2019 12:30 PM, Jose Isaias Cabrera wrote: Igor Tandetnik, on Monday, November 11, 2019 11:02 AM, wrote... Most people have to figure out what Unicode they are using, count the bytes, divide by... and on, and on.  Not me, I just take that

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Igor Tandetnik, on Monday, November 11, 2019 02:24 PM, wrote... > > On 11/11/2019 12:50 PM, Richard Damon wrote: > > Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the > > screen. > > Or more, depending on what you mean by "glyph". See e.g. U+FDFB (ARABIC > LIGATURE

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Igor Tandetnik
On 11/11/2019 12:30 PM, Jose Isaias Cabrera wrote: Igor Tandetnik, on Monday, November 11, 2019 11:02 AM, wrote... Most people have to figure out what Unicode they are using, count the bytes, divide by... and on, and on. Not me, I just take that UTF8, or UTF16 string, convert it to UTF32,

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 2:16 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 12:50 PM, wrote... > >> Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the >> screen. > This is not true, if the string has more or at least 20 UTF32 characters, and > you request 20

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Jens Alfke, on Monday, November 11, 2019 01:00 PM, wrote... > > > On Nov 11, 2019, at 9:39 AM, Jose Isaias Cabrera, on > > > > However, space is cheap now > > It isn't. A sizable fraction of all software development is done for devices > with > under a megabyte of RAM. (IoT and embedded are huge

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Igor Tandetnik
On 11/11/2019 12:50 PM, Richard Damon wrote: Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the screen. Or more, depending on what you mean by "glyph". See e.g. U+FDFB (ARABIC LIGATURE JALLAJALALOUHOU, https://www.fileformat.info/info/unicode/char/fdfb/index.htm ) or

Re: [sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread tab
Just realized that the attachment was not actually included with the original message. Here's a gist link instead: https://gist.github.com/0x09/445fca08ffb4811eae3ca61f965c7a22 > On Nov 11, 2019, at 2:08 PM, tab wrote: > > re:

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Richard Damon, on Monday, November 11, 2019 12:50 PM, wrote... > Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the > screen. This is not true, if the string has more or at least 20 UTF32 characters, and you request 20 character while still talking UTF32, it will print 20.

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Jens Alfke, on Monday, November 11, 2019 12:47 PM, wrote... > > Hang on — why exactly 20 characters? Of text in an arbitrary language, which > is to be displayed in an arbitrary font, with an arbitrary line width? > > I don't know about you, but the only time I think about "exactly 20 >

Re: [sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread tab
re: expanded_sql this is a bit different -- while sqlite3_expanded_sql provides the values interpolated into the statement as text, this patch adds a function for retrieving them individually from the statement, similar to the column access functions. e.g: /* bind some temporary sqlite3_value*

Re: [sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread test user
Wouldn’t your program already know what the values are as it passed them over the FFI initially? Why not hold onto that state? On Mon, 11 Nov 2019 at 17:57, x wrote: > Is http://www.sqlite.org/c3ref/expanded_sql.html no use to you? > > > > > From: sqlite-users

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jens Alfke
> On Nov 11, 2019, at 9:39 AM, Jose Isaias Cabrera wrote: > > However, space is cheap now It isn't. A sizable fraction of all software development is done for devices with under a megabyte of RAM. (IoT and embedded are huge markets.) And remember, we're talking on the email forum for a

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 12:39 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 11:19 AM, wrote... > >> UTF-32 is a reasonable internal operation format, if code-point >> operations are important. It does not make a good transmission format, > I agree. That is why, I have not

Re: [sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread x
Is http://www.sqlite.org/c3ref/expanded_sql.html no use to you? From: sqlite-users on behalf of tab Sent: Monday, November 11, 2019 5:26:42 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] [draft patch] interface for retrieving values of bound

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 12:30 PM, Jose Isaias Cabrera wrote: > Igor Tandetnik, on Monday, November 11, 2019 11:02 AM, wrote... >> On 11/11/2019 10:49 AM, Jose Isaias Cabrera wrote: >>> So, yes, it's bulky, but, if you want to count characters in languages such >>> as >>> Arabic, Hebrew, Chinese, Japanese,

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jens Alfke
> On Nov 11, 2019, at 9:30 AM, Jose Isaias Cabrera wrote: > > Say that I am writing a report and I only want to print the first 20 > characters of a string, that would be something like, Hang on — why exactly 20 characters? Of text in an arbitrary language, which is to be displayed in an

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Richard Damon, on Monday, November 11, 2019 11:19 AM, wrote... > UTF-32 is a reasonable internal operation format, if code-point > operations are important. It does not make a good transmission format, I agree. That is why, I have not created any files for anything as UTF32 for delivery or

Re: [sqlite] database disk image is malformed

2019-11-11 Thread Simon Slavin
On 11 Nov 2019, at 5:13pm, Jukka Marin wrote: > The main process first opens the databases and checks that their > version matches that of the software and if not, the databases are > closed and initialized by running a script. > > After closing the databases, main process forks the children

[sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread tab
Hi all, It'd be handy to be able to retrieve params previously bound to a statement in the C API. Per the advice on the SQLite copyright info page, this is much more of a suggestion than a full patch, though it is functional for binding and retrieving an sqlite_value* (but, for example, there

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jens Alfke
> On Nov 11, 2019, at 7:49 AM, Jose Isaias Cabrera wrote: > > if you want to count characters in languages such as Arabic, Hebrew, Chinese, > Japanese, etc., the easiest way is to convert that string to UTF32, and do a > string count of that UTF32 variable. No, the easiest way is to ask your

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Igor Tandetnik, on Monday, November 11, 2019 11:02 AM, wrote... > > On 11/11/2019 10:49 AM, Jose Isaias Cabrera wrote: > > So, yes, it's bulky, but, if you want to count characters in languages such > > as > > Arabic, Hebrew, Chinese, Japanese, etc., the easiest way is to convert that > >

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 12:13 PM, Simon Slavin wrote: > On 11 Nov 2019, at 4:02pm, Igor Tandetnik wrote: > >> And then what do you do with that count? What do you use it for? > This is a key point. When I started programming I used to do LEFT(A$(I), 14) > frequently. But almost all of them were because I

Re: [sqlite] database disk image is malformed

2019-11-11 Thread Jukka Marin
On Mon, Nov 11, 2019 at 05:03:25PM +, Simon Slavin wrote: > On 11 Nov 2019, at 1:42pm, Jukka Marin wrote: > > > Or does the main process need to close all databases, then fork, then > > reopen the databases? > > Which processes access the databases ? The main process ? Its children ? >

Re: [sqlite] database disk image is malformed

2019-11-11 Thread Shawn Wagner
Doing the latter - closing everything, forking, re-opening - is always going to be safe. Or if the parent isn't going to use the connection, just don't open the database until you're in the child after forking. On Mon, Nov 11, 2019 at 8:08 AM Jukka Marin wrote: > On Fri, Nov 08, 2019 at

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Simon Slavin
On 11 Nov 2019, at 4:02pm, Igor Tandetnik wrote: > And then what do you do with that count? What do you use it for? This is a key point. When I started programming I used to do LEFT(A$(I), 14) frequently. But almost all of them were because I wanted to print the string and had allocated 14

Re: [sqlite] database disk image is malformed

2019-11-11 Thread Simon Slavin
On 11 Nov 2019, at 1:42pm, Jukka Marin wrote: > Or does the main process need to close all databases, then fork, then > reopen the databases? Which processes access the databases ? The main process ? Its children ? Are they all using the same connection ? Are they all trying to use the

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 10:49 AM, Jose Isaias Cabrera wrote: > > Richard Damon, on Monday, November 11, 2019 09:47 AM, wrote... >> On 11/11/19 9:26 AM, Jose Isaias Cabrera wrote: >>> Simon Slavin, on Monday, November 11, 2019 08:50 AM, wrote... On 11 Nov 2019, at 1:35pm, Jose Isaias Cabrera, on

Re: [sqlite] database disk image is malformed

2019-11-11 Thread Jukka Marin
On Fri, Nov 08, 2019 at 09:57:25AM +0200, Jukka Marin wrote: > On Thu, Nov 07, 2019 at 09:26:46AM -0800, Shawn Wagner wrote: > > This line stood out: > > > > > The main process opens the databases and then forks the other processes > > which can then perform database operations using the already

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Igor Tandetnik
On 11/11/2019 10:49 AM, Jose Isaias Cabrera wrote: So, yes, it's bulky, but, if you want to count characters in languages such as Arabic, Hebrew, Chinese, Japanese, etc., the easiest way is to convert that string to UTF32, and do a string count of that UTF32 variable. Between ligatures and

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Richard Damon, on Monday, November 11, 2019 09:47 AM, wrote... > > On 11/11/19 9:26 AM, Jose Isaias Cabrera wrote: > > Simon Slavin, on Monday, November 11, 2019 08:50 AM, wrote... > >> On 11 Nov 2019, at 1:35pm, Jose Isaias Cabrera, on > >> > >>> Not if the system uses UTF32. :-) You could put

Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'

2019-11-11 Thread Dan Kennedy
On 8/11/62 00:15, Dennis Clarke wrote: On 2019-11-07 11:44, Shawn Wagner wrote: ... Just don't use strict c99 mode when compiling with gcc? Drop the -std argument from your CFLAGS to use the default (gnu11 since gcc 5) or explicitly use gnu99, which gives you that version of the C standard +

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 9:26 AM, Jose Isaias Cabrera wrote: > Simon Slavin, on Monday, November 11, 2019 08:50 AM, wrote... >> On 11 Nov 2019, at 1:35pm, Jose Isaias Cabrera, on >> >>> Not if the system uses UTF32. :-) You could put the pictograph in that that >>> textbox, and it'll work. >> Can you point to

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Simon Slavin, on Monday, November 11, 2019 08:50 AM, wrote... > > On 11 Nov 2019, at 1:35pm, Jose Isaias Cabrera, on > > > Not if the system uses UTF32. :-) You could put the pictograph in that that > > textbox, and it'll work. > > Can you point to some description of this and how it works ?

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Simon Slavin
On 11 Nov 2019, at 1:35pm, Jose Isaias Cabrera wrote: > Not if the system uses UTF32. :-) You could put the pictograph in that that > textbox, and it'll work. Can you point to some description of this and how it works ? I've never heard of it. ___

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Jose Isaias Cabrera
Richard Damon, on Sunday, November 10, 2019 07:01 AM, wrote... > Actually, 'The Artist whose name formerly was Prince' (which wasn't his > name, his legal name was an unpronounceable pictograph), breaks every > computer system I know. Not if the system uses UTF32. :-) You could put the