On 5-5-2015 11:25, Kees Nuyt wrote:
> On Tue, 05 May 2015 10:50:00 +0200, Clemens Ladisch <clemens at ladisch.de> 
> wrote:
>
>> Luuk wrote:
>>> on Windows 7:
>>> C:\temp>sqlite3.exe encoding.sqlite
>>> sqlite> select * from test;
>>> ??n
>>
>> The Windows console does not support UTF-8 with the default settings and
>> the C stdio functions.  Any data you entered in the console is not
>> encoded correctly.
>
> I totally agree. It depends on the shell what representation is used,
> some MS Windows codepage or UTF-8.
>
> The example below is done in bash on MS Windows 7 (using Mobaxterm),
> with a (outdated) Windows sqlite3 executable.
> The result of .dump contains UTF-8.
>
>> sqlite3 t.sqlite
> SQLite version 3.7.13 2012-06-11 02:05:22
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table t1 (id INTEGER PRIMARY KEY NOT NULL, tx TEXT);
> sqlite> insert into t1 values (1,'??n');
> sqlite> .dump
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE t1 (id INTEGER PRIMARY KEY NOT NULL, tx TEXT);
> INSERT INTO "t1" VALUES(1,'??n');
> COMMIT;
> sqlite> .q
>
>> sqlite3 t.sqlite .dump| grep INSERT | od -t x1
> 0000000 49 4e 53 45 52 54 20 49 4e 54 4f 20 22 74 31 22
> 0000020 20 56 41 4c 55 45 53 28 31 2c 27 c3 a9 c3 a9 6e
> 0000040 27 29 3b 0a
> 0000044
>

OK, thanks....

Reply via email to