Re: [sqlite] Encoding question

2015-02-02 Thread RSmith
On 2015/02/02 19:37, Peter Haworth wrote: On Mon, Feb 2, 2015 at 9:00 AM, wrote: From: RSmith To: sqlite-users@sqlite.org Subject: Re: [sqlite] Encoding question Message-ID: <54cebb71.8060...@rsweb.co.za> Content-Type: text/plain; charset=windows-1252; format=flowed In short, the

Re: [sqlite] Encoding question

2015-02-02 Thread Richard Hipp
On 2/2/15, Peter Haworth wrote: > I should also have mentioned that the question also included table names, > column names, constraint names, etc, but I'll assume the same applies to > them as for the data. > The schema is *always* in the database encoding. The SQLite parser wouldn't be able to

Re: [sqlite] Encoding question

2015-02-02 Thread Peter Haworth
On Mon, Feb 2, 2015 at 9:00 AM, wrote: > From: RSmith > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Encoding question > Message-ID: <54cebb71.8060...@rsweb.co.za> > Content-Type: text/plain; charset=windows-1252; format=flowed > > In short, the UTF-8 Pragma

Re: [sqlite] Encoding question

2015-02-01 Thread Richard Hipp
On 2/1/15, Peter Haworth wrote: > I'm new to the unicode world so this question may not make sense. > > The "PRAGMA encoding" statement tells me the encoding of a database. Can I > rely on all data in the database having that encoding? For example, if the > encoding is UTF8 and a row is inserted c

Re: [sqlite] Encoding question

2015-02-01 Thread Stephan Beal
On Mon, Feb 2, 2015 at 12:49 AM, RSmith wrote: > guarantee that /IF/ you put valid UTF-8 data in there, it will be handled > and returned correctly). > For a given definition of "correct." A relatively common topic on this list is the handling of locale-specific collations (a topic i'm not quali

Re: [sqlite] Encoding question

2015-02-01 Thread RSmith
On 2015/02/02 01:12, Peter Haworth wrote: I'm new to the unicode world so this question may not make sense. The "PRAGMA encoding" statement tells me the encoding of a database. Can I rely on all data in the database having that encoding? For example, if the encoding is UTF8 and a row is inserte

[sqlite] Encoding question

2015-02-01 Thread Peter Haworth
I'm new to the unicode world so this question may not make sense. The "PRAGMA encoding" statement tells me the encoding of a database. Can I rely on all data in the database having that encoding? For example, if the encoding is UTF8 and a row is inserted containing UTF16 encoded data, will it stil

Re: [sqlite] SQLite encoding-specific functions

2014-04-06 Thread Ben
On 6 Apr 2014, at 21:28, Richard Hipp wrote: > On Sun, Apr 6, 2014 at 4:18 PM, Ben wrote: > >> Hi all, >> >> Is there any advantage to using the encoding specific functions from the C >> api? >> >> For example, given a database with its encoding set to UTF-16, should I >> try to use the _byte

Re: [sqlite] SQLite encoding-specific functions

2014-04-06 Thread Richard Hipp
On Sun, Apr 6, 2014 at 4:18 PM, Ben wrote: > Hi all, > > Is there any advantage to using the encoding specific functions from the C > api? > > For example, given a database with its encoding set to UTF-16, should I > try to use the _bytes16() / _text16() functions? > > Or should I just say "I'm U

[sqlite] SQLite encoding-specific functions

2014-04-06 Thread Ben
Hi all, Is there any advantage to using the encoding specific functions from the C api? For example, given a database with its encoding set to UTF-16, should I try to use the _bytes16() / _text16() functions? Or should I just say "I'm UTF-8 all the way" and use the other functions, allowing SQ

Re: [sqlite] Encoding and Collation

2011-09-14 Thread Antonio Maniero
> > Just wanted to add a small warning: the problem with using custom > collations is that if you use them in indexes, then all applications that > use the same database must also have the same collation for everything to > work OK. > > I'm aware of this. Thanks. I will build the like function too

Re: [sqlite] Encoding and Collation

2011-09-14 Thread Nuno Lucas
On 09/11/2011 08:27 PM, Antonio Maniero wrote: It's very easy to replace the SQLite functions with user-defined ones, so if someone wants to go the easy way (partial support for just the common western scripts) it's easy. And already done by many, if you search the mailing list. It's exactly wh

Re: [sqlite] Encoding and Collation

2011-09-14 Thread Antonio Maniero
> > You can try my quick and dirty "pseudo-universal" extension for > less-than-perfect Unicode support. > > Go download the extension at http://dl.dropbox.com/u/** > 26433628/unifuzz.zip . Take > the time to fully read the explanations at top of the s

Re: [sqlite] Encoding and Collation

2011-09-14 Thread Antonio Maniero
> > In either case the wrapping and registration with > sqlite_create_collation_v2 > is quite easy. > Yes, it is. I thought that the actual algorithm would be harder but I was wrong. It's surprisingly ease and simple to build a simple algorithm to handle utf8 ASCII and Latin Basic plane with stan

Re: [sqlite] Encoding and Collation

2011-09-13 Thread Jean-Christophe Deschamps
> It's very easy to replace the SQLite functions with user-defined ones, > so if someone wants to go the easy way (partial support for just the > common western scripts) it's easy. And already done by many, if you > search the mailing list. It's exactly what I'm looking for. It could be my mis

Re: [sqlite] Encoding and Collation

2011-09-12 Thread Jan Hudec
On Sun, Sep 11, 2011 at 11:55:23 -0300, Antonio Maniero wrote: > I doubt it that it would be ease to storing 8859 without string functions > problems. The proper collation would be simple, of course, but probably I > would need to re-implement all string functions too. Am I wrong? > > I can use ut

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Antonio Maniero
> > Nothing changed, except now the SQLite 3 API *EXPLICITLY* says the > text functions require either UTF-8 or UTF-16, but nothing stops > someone doing the same as with SQLite2 and store it's text as BLOBs. > > I forgot to reply this. I thought about BLOB as it uses single byte storage but beside

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Antonio Maniero
> > Do you relly know that there is no 8859 encoding? > The standards go from ISO-8859-1 to ISO-8859-16 and you would need to > have collations for all of them and a way to let the user choose which > one is the right one for them (including regional variations). > For me I just need the 8859-1.

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Antonio Maniero
> > Possibly because SQLite3 supports UTF-8 and UTF-16 rather than ASCII. > Assuming you're using the ICU stuff, of course. > Yes, I know that, but I wish to know the reason. Why the authors choose turn off 8859 rather than keep both like as it was before? Technical reason? > Exactly. Though I

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Nuno Lucas
On Sun, Sep 11, 2011 at 15:55, Antonio Maniero wrote: >> >> I see. Well, SQLite2 is ancient: that ship has sailed and it's not coming >> back. >> >> Did SQLite2 actually implement case-insensitive comparison on accented >> Latin characters? I honestly don't know - by the time I got involved with >

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Igor Tandetnik
Simon Slavin wrote: > Though I'm having trouble pointing to a page for the SQLite3 ICU stuff at the > moment. It would be here: http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/icu/README.txt but the server seems to be down at the moment. -- Igor Tandetnik

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Simon Slavin
On 11 Sep 2011, at 3:55pm, Antonio Maniero wrote: > Maybe someone else could say about the reason that SQLite dropped 8859 > encoding. Possibly because SQLite3 supports UTF-8 and UTF-16 rather than ASCII. Assuming you're using the ICU stuff, of course. > I can use utf8 but for me SQLite won't

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Antonio Maniero
> > I see. Well, SQLite2 is ancient: that ship has sailed and it's not coming > back. > > Did SQLite2 actually implement case-insensitive comparison on accented > Latin characters? I honestly don't know - by the time I got involved with > SQLite (in late 2005), SQLite2 was already history, and its

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Igor Tandetnik
Antonio Maniero wrote: >>> Why SQLite dropped the 8859 or single byte support for text? Is there >>> any technical reason? >> >> What do you mean, dropped? What exactly used to worked before and has > stopped working now? What event has occurred between then and now that you > attribute the probl

Re: [sqlite] Encoding and Collation

2011-09-11 Thread Antonio Maniero
> > Why SQLite dropped the 8859 or single byte support for text? Is there > > any technical reason? > > What do you mean, dropped? What exactly used to worked before and has stopped working now? What event has occurred between then and now that you attribute the problem to? Maybe I had misundersto

Re: [sqlite] Encoding and Collation

2011-09-10 Thread Igor Tandetnik
Antonio Maniero wrote: > Why SQLite dropped the 8859 or single byte support for text? Is there > any technical reason? What do you mean, dropped? What exactly used to worked before and has stopped working now? What event has occurred between then and now that you attribute the problem to? > Is

[sqlite] Encoding and Collation

2011-09-10 Thread Antonio Maniero
Hi Sorry by my bad English. Why SQLite dropped the 8859 or single byte support for text? Is there any technical reason? Is there any ready simple solution to use case insensitive collation on SQLite to work with non-English (Latin) characters? I don't need and I don't want a full ICU implementat

Re: [sqlite] Encoding Question

2011-05-31 Thread Brian Pears
Christian Schwarz wrote: >This is base64. Christian Many thanks - I've not come across this before, but there's enough in the Wikipedia article to enable me to write a little vb script to convert the base64 to text. Brian -- Brian Pears (Gateshead) __

Re: [sqlite] Encoding Question

2011-05-31 Thread Christian Schwarz
This is base64. Christian ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Encoding Question

2011-05-31 Thread Brian Pears
As you will gather I am very new to SQLite and indeed to databases in general, so please bear with me. I am using the Singular SQLiteExplorer 3.04 to examine a Rootsmagic database. When I display a particular table, right click on a particular blob cell in the "Fields" column and select "Copy

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Jean-Christophe Deschamps
Hi Pavel, >I believe you need to show us your sql query. Maybe something in it >forces SQLite to use UTF-16 version of the function. On the contrary, I believe this is due to a serious design bug, where it is impossible to perform anything like: select load_extension('whatever.dll');

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Jean-Christophe Deschamps
The 3.6.18 sqlite3.exe CLI produces the same problem: the internal functions below can't be overloaded and trying to do so returns 5. System is XP Pro x86 SP3. What can I try next ? >I see that sqlite3.dll is returning 5 == SQLITE_BUSY for the following >functions: > >upper UTF-8 >low

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Jean-Christophe Deschamps
If I set a breakpoint on this: rc = sqlite3_create_function(db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0); I see that sqlite3.dll is returning 5 == SQLITE_BUSY for the following functions: upper UTF-8 lower UTF-8 like 2-arg UTF-8 like 3-arg UTF-8 g

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Jean-Christophe Deschamps
Update: the problem is in the function registration. I tried to comment out the UTF-16 registration and the really weird thing is that using the following code, only GLOB with 3 arguments gets actually registered (along with all 1-arg string functions and the two collations). There must be so

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Jean-Christophe Deschamps
Hi Pavel, >I believe you need to show us your sql query. Maybe something in it >forces SQLite to use UTF-16 version of the function. Ummm, I don't kno where the problem is, but _any_ simple select will do (for me), e.g.: An UTF-8 base... CREATE TABLE "PaysISO" ( "Nom_Iso" CHAR(43), "Cod

Re: [sqlite] Encoding specs & functions overloading

2009-10-13 Thread Pavel Ivanov
> I'm using the 3.6.18 Windows dll downloaded direct from the site. > > I just re-checked that. I believe you need to show us your sql query. Maybe something in it forces SQLite to use UTF-16 version of the function. Pavel On Mon, Oct 12, 2009 at 11:44 PM, Jean-Christophe Deschamps wrote: > Tha

Re: [sqlite] Encoding specs & functions overloading

2009-10-12 Thread Jean-Christophe Deschamps
Thank you for your fast answer. >I'm surprised by this too. In fact, I cannot reproduce it. I'm using the 3.6.18 Windows dll downloaded direct from the site. I just re-checked that. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sql

Re: [sqlite] Encoding specs & functions overloading

2009-10-12 Thread D. Richard Hipp
On Oct 12, 2009, at 10:20 PM, Jean-Christophe Deschamps wrote: > > I'm surprised that if I register overloading functions for LIKE or > GLOB > in both UTF-8 and UTF-16, only the UTF-16 version is called despite > the > fact that the database is UTF-8. I'm surprised by this too. In fact, I c

[sqlite] Encoding specs & functions overloading

2009-10-12 Thread Jean-Christophe Deschamps
I'm surprised that if I register overloading functions for LIKE or GLOB in both UTF-8 and UTF-16, only the UTF-16 version is called despite the fact that the database is UTF-8. I don't see the same behavior with the other scalar functions (lower, upper), which call the UTF-8 version as expecte

[sqlite] Encoding problem indeed...

2008-02-05 Thread Vladimir Mincev
I have found out what is the matter. In SQLite3 encoding works fine (I tried it by manually inserting values thrum SQlite browser - which exclude application error), but in older version of SQLite (which I used for my database by not knowing which version it is) it doesn't work. Since I have read

[sqlite] Encoding confusion

2007-04-12 Thread Anders Persson
Hi! I am using SQLITE to save webbased data, under Unix, linux, osx the program is written i C, and uses the C-interface. What is confusing me is how are the string stored, if i understand corrent it is UTF-8 is this done automatic and what coding is a get back when a extra data ? Stupid questio

Re: [sqlite] Encoding with spanish characters

2006-07-13 Thread Will Leshner
On 7/13/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: No, I'm no sure. How can I test it? I've just started to learn C/C++ and I have no idea how to do it. While it is theoretically possible to test the encoding of the string, I'm not sure how practical it is. I think it would be easier to c

RE: [sqlite] Encoding with spanish characters

2006-07-13 Thread Pat Wibbeler
users@sqlite.org Subject: Re: [sqlite] Encoding with spanish characters No, I'm no sure. How can I test it? I've just started to learn C/C++ and I have no idea how to do it. Thanks again. Pedro. Will Leshner escribió: > On 7/12/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: >

Re: [sqlite] Encoding with spanish characters

2006-07-13 Thread Pedro J. Vivancos
No, I'm no sure. How can I test it? I've just started to learn C/C++ and I have no idea how to do it. Thanks again. Pedro. Will Leshner escribió: On 7/12/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: I'm developing a program using C++ and SQLite3 as database. I have a problem with encodi

Re: [sqlite] Encoding with spanish characters

2006-07-12 Thread Will Leshner
On 7/12/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: I'm developing a program using C++ and SQLite3 as database. I have a problem with encoding when I try to execute a SQL query with some characters like "ñ, á, é, í, ó, ú". My db is UTF-8 encoded and when I'm debugging I can see that the sen

[sqlite] Encoding with spanish characters

2006-07-12 Thread Pedro J. Vivancos
Dear friends, I'm developing a program using C++ and SQLite3 as database. I have a problem with encoding when I try to execute a SQL query with some characters like "ñ, á, é, í, ó, ú". My db is UTF-8 encoded and when I'm debugging I can see that the sentence is right but I have no result. How

Re: [sqlite] Encoding problem ISO 8859-1 / UTF-8

2006-05-22 Thread Nuno Lucas
On 5/18/06, Pasquale Imbemba <[EMAIL PROTECTED]> wrote: What do I need to do to fix this? Must I compile SQLite again having UTF-8 deactivated? I'd prefer using ISO 8859-1 over UTF-8 if possible. It's probably a bug in the intermediate wrappers (or in you program, off course). Note that you hav

[sqlite] Encoding problem ISO 8859-1 / UTF-8

2006-05-18 Thread Pasquale Imbemba
Hi all, sorry for repost, but I have gathered some more info for my encoding problem. I am using latest SQLite with Java 1.4.2 and openSuSE in order to build a morphological analyzer for the German language (it's an open source project for my University). I found out that SuSE has UTF-8 activated

[sqlite] Encoding problem

2006-05-18 Thread Pasquale Imbemba
Hi all, I am inserting Strings from Java into my db. In Java those Strings have German umlauts, i.e. ä, ü, ß, ö. When I check in the db I see that there have been replaced with a dotted square. How do I fix this? BTW: When I insert data from SQLite shell, it is displayed correctly. Thanks in a

Re: [sqlite] encoding

2004-06-24 Thread Michael Roth
nathanvi wrote: Thanks. Do you know how can i teach to my application (phpsqliteadmin and sqlitebrowser-GUI) the result set is utf8 and it is not iso8859-1? I'm sorry. I don't know that. Maybe the authors of these tools know how to solve your problem? At least for the PHP stuff I guess it's relat

Re: [sqlite] encoding

2004-06-24 Thread nathanvi
Il giorno Thu, 24 Jun 2004 14:04:56 +0200, tu oh prode Michael Roth <[EMAIL PROTECTED]> hai scritto una mail. Il suo oggetto era"Re: [sqlite] encoding": > Looks like that's sqlitebrowser and phpsqliteadmin fault. Yes. it is as you said. As the matter of fact i made a

Re: [sqlite] encoding

2004-06-24 Thread Michael Roth
nathanvi wrote: Strings are in utf8 encoding. My system has utf8 locales too. I've a lot of problem with accents as èéàòù. I inserted them in a field. When i make a select of that field, i obtain right accents via shell: sqlite db.sqlite 'select frase from logchan limit 16660' => èéàòù On the contr

[sqlite] encoding

2004-06-24 Thread nathanvi
Hello i'm writing a program which insert a lot of strings in a sqlite db with perl language. Strings are in utf8 encoding. My system has utf8 locales too. I've a lot of problem with accents as èéàòù. I inserted them in a field. When i make a select of that field, i obtain right accents via shell