On Fri, Jun 24, 2016 at 12:54 PM, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> > On Friday, 24 June, 2016 12:17 -0600, Scott Robison said:
>
> > Okay, rather than guessing, I just did a test from a Windows 10 command
> > prompt. I am getting appropriate UTF-8 sequences. Here is my experiment:
> >
> > I opened a memory database and issued the following commands:
> >
> > create table test(a text);
> > insert into test values('ß'),('▀'),('á'),('ß'); -- for the first value I
> > typed ALT+225, then ALT+223, then ALT+0225, then ALT+0223
> > select a, hex(a) from test;
> >
> > Which resulted in four rows of output:
> >
> > ß|C3A1
> > ▀|C39F
> > á|C2A0
> > ß|C3A1
>

{snipped}


> And I get this, on Windows 10 1511, Consolas font, codepage 437 (IBM ANSI
> codepage with drawing characters in upper 127 characters):
>
> Windows supports legacy ALT+### codes that map to the legacy code page. It
> > also supports ALT+0### which map to Unicode code points. This allows
> > people who're accustomed to the ALT+### format to still see the
> character they
> > expect, but translated to the equivalent Unicode code point.
>
> This is claimed, but not quite true.  I don't know what font and codepage
> you have set for the console but they affect both the input and output
> conversions.  Generally, the ACP codepage(s) work correctly, OEM ones do
> not.  You also have to match the font to the codepage or the input
> translation is based on the output translation, resulting in incorrectness.
>
> I suspect you are using an OEM font, and not a unicode font ...
>

No, I'm using consolas, but am using whatever default codepage settings
come with the system (I installed Windows 10 1511 February update on a new
computer a few months ago). ACP=1252, MACCP=10000, OEMCP=437. chcp reports
my console is using code page 437.

In any case: the keyboard input with the SQLite shell on Windows 10 default
configuration (with consolas as the font) clearly does translate code
points to UTF-8 sequences.

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

Reply via email to