> Le 20 juin 2017 à 15:56, Simon Slavin <slav...@bigfraud.org> a écrit :
> 
> The console you see is pretty-much the one which was in Windows 3.1.  It does 
> not use the modern API written post-unicode, it calls the old 
> single-character Windows routines which are still in Windows so old programs 
> don’t suddenly stop working.  It has numerous parts which assume
> 
> one keypress == one character == one octet == one space on the display

The console I/O can be used to enter (keyboard) not-so-basic unicode codepoints 
and the output can be sent pretty much anything you want, as long as the font 
selected in the console has been built with enough support for the eventually 
exotic glyphs you want to output.  That's the application you run in the 
console that has to use the right APIs for the job 
(ReadConsoleW/WriteConsoleW).  The support of these goes back to Windows 2000.

With some modified sqlite3.exe using those, here is what I can type 
interactively at the console:

SQLite version 3.19.3 2017-06-08 14:26:16
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table é€(a text);
sqlite> insert into é€ values('ñ');
sqlite> select * from é€;
ñ
sqlite> .once a.txt
sqlite> .dump
sqlite> .q

Here is the content of the file as seen on console when doing "type a.txt":

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE ├®Ôé¼(a text);
INSERT INTO "├®Ôé¼" VALUES('├▒');
COMMIT;

You can see the UTF-8 output sent to the dump file is correct - open it with 
notepad for instance. Side note: the system command "type" is not able to 
display it unless you do a CHCP 65001. It just proves I could type characters 
on the keyboard input which do not follow the concept 'one keypress - one 
character - one octet - one space on the display'.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to