Re: [sqlite] ?==?utf-8?q? Sqlite 3.31.0 breaks firefox and thunderbird

2020-01-24 Thread Bernhard Rosenkraenzer
On Thursday, January 23, 2020 17:00 CET, Richard Hipp wrote: > On 1/23/20, Bernhard Rosenkraenzer wrote: > > Hi, > > after updating sqlite to 3.31.0, both firefox and thunderbird crash on > > startup (rebuilding them against the newer sqlite doesn't help). > > Is this related to https://bugzi

Re: [sqlite] UTF-8

2013-02-20 Thread Richard Hipp
On Wed, Feb 20, 2013 at 3:43 PM, Marco Bambini wrote: > Sometimes instead of a query like: > "INSERT INTO foo (col1) VALUES ('Boxhagener Straße');" > > I receive the utf-8 encoded counterpart: > "INSERT INTO foo (col1) VALUES ('Boxhagener Str\u00c3\u009fe');" > > Is there a way to automatically d

[sqlite] UTF-8

2013-02-20 Thread Marco Bambini
Sometimes instead of a query like: "INSERT INTO foo (col1) VALUES ('Boxhagener Straße');" I receive the utf-8 encoded counterpart: "INSERT INTO foo (col1) VALUES ('Boxhagener Str\u00c3\u009fe');" Is there a way to automatically decode this latest query to UTF-8 just using sqlite API? Please note

Re: [sqlite] UTF-8 strings & ICU

2011-03-17 Thread Simon Slavin
On 18 Mar 2011, at 5:07am, ashish yadav wrote: > Can you please also provide some code sample for same ? > > i am not able to understand, your point "When a custom collation is > registered, it may indicate whether it wants its strings in UTF-8, UTF-16 or > either." The ICU extension for SQLi

Re: [sqlite] UTF-8 strings & ICU

2011-03-17 Thread ashish yadav
Hi Igor, Thanks a lot for info. Can you please also provide some code sample for same ? i am not able to understand, your point "When a custom collation is registered, it may indicate whether it wants its strings in UTF-8, UTF-16 or either." Thanks & Regards Ashish On Fri, Mar 18, 2

Re: [sqlite] UTF-8 strings & ICU

2011-03-17 Thread Igor Tandetnik
On 3/18/2011 12:27 AM, ashish yadav wrote: > My application is using UTF-8 strings ie database contain UTF-8 strings. > For sorting requirement of application ,i use ICU which is integrated with > sqlite3. > > Now ICU support UTF-16 encode string for its operation. > > Can any one please tell me

[sqlite] UTF-8 strings & ICU

2011-03-17 Thread ashish yadav
Hi, My application is using UTF-8 strings ie database contain UTF-8 strings. For sorting requirement of application ,i use ICU which is integrated with sqlite3. Now ICU support UTF-16 encode string for its operation. Can any one please tell me how to deal with this situation ? If ICU/Sqlite3

Re: [sqlite] UTF-8

2011-01-03 Thread Ming Lu
Hey, i found the solution for the utf-8 encoding problem: i used the: wchar_t chAppWinTextUnicode[MAX_PATH] = { 0 }; ::*GetWindowTextW*(hWnd, chAppWinTextUnicode, MAX_PATH); int nSize = *WideCharToMultiByte*(/*CP_UTF8*/, 0, chAppWinTextUnicode, -1, NULL, 0, NULL, NULL); char* pchBuffer= (char*)

Re: [sqlite] UTF-8

2010-12-17 Thread Ming Lu
Hello afriza, thanks for your quick replay. if i use the WCHAR or std'::wstring, should i used the _UNICODE macro in the Visual Studio Project setting? best regards ming On 16.12.2010 17:34, Afriza N. Arief wrote: > @Cory: correct. > > Fixed Code: > > HWND hWnd = /* from somewhere */; > int nL

Re: [sqlite] UTF-8

2010-12-16 Thread Afriza N. Arief
@Cory: correct. Fixed Code: HWND hWnd = /* from somewhere */; int nLen = GetWindowTextLength(hWnd) + 1; WCHAR* lpszText = (WCHAR*)malloc(nLen*sizeof(WCHAR)); // std::wstring str; str.resize(nLen); nLen = GetWindowText(hWnd,lpszText,nLen); // str.resize(nLen=GetWindowText(hWnd,&str[0],nLen)); sqli

Re: [sqlite] UTF-8

2010-12-16 Thread Cory Nelson
Just a quick note -- TCHAR is not always UTF-16, and sqlite3_bind_text16 takes a void* so it will happily take whatever you give it. You should be using wchar_t directly instead of TCHAR, so an error can be caught when you use GetWindowText. -- Cory Nelson http://int64.org On Thu, Dec 16, 2010 a

Re: [sqlite] UTF-8

2010-12-16 Thread Afriza N. Arief
Try this: HWND hWnd = /* from somewhere */; int nLen = GetWindowTextLength(hWnd) + 1; TCHAR* lpszText = (TCHAR*)malloc(nLen*sizeof(TCHAR)); // std::wstring str; str.resize(nLen); nLen = GetWindowText(hWnd,lpszText,nLen); // str.resize(nLen=GetWindowText(hWnd,&str[0],nLen)); sqlite3_bind_text16(st

Re: [sqlite] UTF-8

2010-12-16 Thread Pavel Ivanov
> std::string strText = GetWindowsTitle(...); > the GetWindowsTitle occupied sometime with the umlaut. > so how will you do, if you want save std::string into sqlite with keeped > umlaut? My bet would be that GetWindowsTitle (even if it's not GetWindowTitle from Win32 API) returns string to you in

Re: [sqlite] UTF-8

2010-12-16 Thread Jonas Sandman
I suggest you try using wchar_t* or std::wstring as std::string is not Unicode afaik. Regards, Jonas On Thu, Dec 16, 2010 at 2:40 PM, Ming Lu wrote: > Hello Martin, > > thank you very much for your suggestion. > > i tried again with the firefox plugin works very well with the umlaut.(i > update

Re: [sqlite] UTF-8

2010-12-16 Thread Ming Lu
Hello Martin, thank you very much for your suggestion. i tried again with the firefox plugin works very well with the umlaut.(i update the feld with a "ä", it can been shown correctly). in my code: std::string strText = GetWindowsTitle(...); the GetWindowsTitle occupied sometime with the umla

Re: [sqlite] UTF-8

2010-12-16 Thread Martin Engelschalk
Hello Ming, sqlite does nothing to transform data between codepages, and it assumes that data you insert is passed in UTF8. However, sqlite will acept any data and store it. If the firefox plugin does not show you data correctly, then you problably did not pass correct UTF8 to sqlite. Can you c

[sqlite] UTF-8

2010-12-16 Thread Ming Lu
Hello everyone, i am faceing a problem with unicode to save german umlaute in sqlite: here ist the problem: dev-envoriment: Visual studio 2008 SQLite 3.6.20 i used the sqlite c/c++ interface and open a db used sqlite3_open. during the running of my application will the german-umlaut or other

Re: [sqlite] UTF-8 and UTF-16

2010-02-03 Thread a1rex
>From: Jens Miltner >Sent: Wed, February 3, 2010 9:46:06 AM >Just another thought to consider: depending on the amount of non-ASCII >(or non-roman) string data stored in your database, in may be more >efficient to use UTF-8 encoding rather than UTF-16 encoding: >UTF-8 takes up less space for

Re: [sqlite] UTF-8 and UTF-16

2010-02-03 Thread Jens Miltner
Am 01.02.2010 um 00:02 schrieb a1rex: > I am planning to store text in a database which has to accommodate a > few international languages. > In this case I have to use UTF-16LE encoding for my TEXT fields. > I know that once an encoding has been set for a database, it cannot > be changed. J

Re: [sqlite] UTF-8 and UTF-16

2010-01-31 Thread a1rex
Thank you for your help! This call: sqlite3_exec(handle,"PRAGMA encoding = \"UTF-16\"",NULL,NULL,&zErr); works. Samuel - Original Message From: Igor Tandetnik To: sqlite-users@sqlite.org Sent: Sun, January 31, 2010 6:12:27 PM Subject: Re: [sqlite] UTF-8 and

Re: [sqlite] UTF-8 and UTF-16

2010-01-31 Thread Kees Nuyt
On Sun, 31 Jan 2010 18:12:27 -0500, "Igor Tandetnik" wrote: >It's PRAGMA encoding = "UTF-16". The parameter needs to be quoted. This is indeed the syntax description. Peculiarly, anywhere else, string literals have to be single quoted. Is this something to iron out in v4 ? -- ( Kees Nuyt

Re: [sqlite] UTF-8 and UTF-16

2010-01-31 Thread Igor Tandetnik
a1rex wrote: > I am planning to store text in a database which has to accommodate a few > international languages. > In this case I have to use UTF-16LE encoding for my TEXT fields. Perhaps there are some external reasons, but there's nothing in SQLite that would force this. For example, UTF-8 i

[sqlite] UTF-8 and UTF-16

2010-01-31 Thread a1rex
I am planning to store text in a database which has to accommodate a few international languages. In this case I have to use UTF-16LE encoding for my TEXT fields. I know that once an encoding has been set for a database, it cannot be changed. Do BLOBS are effected? I guess I cannot mix TEX

[sqlite] UTF-8 Collation anyone?

2009-03-23 Thread Alberto Simões
Hello I am not yet sure how to write a collation and, worst, how to integrate it with DBD::SQLite. But, does anybody write a UTF-8 collation that I can use as base? Or, yet better, does anyone has experience on using a collation with DBD::SQLite? TIA. -- Alberto Simões __

Re: [sqlite] UTF-8 by default?

2009-01-27 Thread Igor Tandetnik
J. R. Westmoreland wrote: > I haven't found, yet, where it says this but, I assume UTF-8 is the > default storage for character strings in the database? http://sqlite.org/c3ref/open.html The default encoding for the database will be UTF-8 if sqlite3_open() or sqlite3_open_v2() is called and UTF-

[sqlite] UTF-8 by default?

2009-01-27 Thread J. R. Westmoreland
I haven't found, yet, where it says this but, I assume UTF-8 is the default storage for character strings in the database? I see where I can specify UTF-16*. Is there support for UTF-32? Thanks, J. R. J. R. Westmoreland E-mail: j...@jrw.org _

Re: [sqlite] UTF-8 BLOB

2007-11-07 Thread Robert Wishlaw
On Nov 6, 2007 8:55 AM, Joe Wilson <[EMAIL PROTECTED]> wrote: > It works in a Linux xterm. > There's probably some UTF or codepage issue with the Windows console. > Try using another command-line shell. > Thank you for your response Joe. It is a codepage issue. Using sqlite3.exe 3.5.2 from a Windo

Re: [sqlite] UTF-8 BLOB

2007-11-06 Thread Joe Wilson
It works in a Linux xterm. There's probably some UTF or codepage issue with the Windows console. Try using another command-line shell. --- Robert Wishlaw <[EMAIL PROTECTED]> wrote: > Using sqlite 3.5.2 on Windows XP, I have a textblob.csv file > > 192,C0,À0,À0 > 193,C1,Á0,Á0 > 254,FE,þ0,þ0 > 255

[sqlite] UTF-8 BLOB

2007-11-06 Thread Robert Wishlaw
Using sqlite 3.5.2 on Windows XP, I have a textblob.csv file 192,C0,À0,À0 193,C1,Á0,Á0 254,FE,þ0,þ0 255,FF,ÿ0,ÿ0 which I have imported into a new database sqlite3 textblob.db < textblob.sql via a file named textblob.sql .separator , create Table textblob(dec INTEGER, hex BLOB, txt TEXT, blb BL

Re: [sqlite] UTF-8 or ISO-8859-1

2007-03-25 Thread Darren Duncan
At 9:42 PM +0200 3/25/07, Ralph Müller wrote: to store (german) Text in a SQLite Database, is it better to use UTF-8 or is ISO-8859-1 more recommendable? It is recommended to use UTF-8 no matter what language text is in the database, since it is fully adaptable to any situation. Also, with

Re: [sqlite] UTF-8 or ISO-8859-1

2007-03-25 Thread Frank Baumgart
Ralph Müller schrieb: Hi all, to store (german) Text in a SQLite Database, is it better to use UTF-8 or is ISO-8859-1 more recommendable? UTF-8. Frank - To unsubscribe, send email to [EMAIL PROTECTED]

[sqlite] UTF-8 or ISO-8859-1

2007-03-25 Thread Ralph Müller
Hi all, to store (german) Text in a SQLite Database, is it better to use UTF-8 or is ISO-8859-1 more recommendable? Thx in advance 4 help. Cheers! Ralph PS: Please excuse my terrible english. Thx. - To unsubscribe, s

Re: [sqlite] UTF-8 and ISO-8859-1 in the same library

2004-07-30 Thread Christian Smith
On Fri, 30 Jul 2004, Bertrand Mansion wrote: >Hi, > >How difficult would it be to have both UTF-8 and ISO-8859-1 supported in >the same library (2.8.15) ? By looking quickly at the sources, it seems >to be just a matter of changing the functions likeFunc(), globFunc(), >lengthFunc() and substrFunc

[sqlite] UTF-8 and ISO-8859-1 in the same library

2004-07-30 Thread Bertrand Mansion
Hi, How difficult would it be to have both UTF-8 and ISO-8859-1 supported in the same library (2.8.15) ? By looking quickly at the sources, it seems to be just a matter of changing the functions likeFunc(), globFunc(), lengthFunc() and substrFunc(). They could use a flag in order to call the co