#536662 sqlite3: CLI not UTF-8 clean

Package:
sqlite3
Source:
sqlite3
Description:
Command line interface for SQLite 3
Submitter:
Martin Godisch
Date:
2014-11-03 00:00:08 UTC
Severity:
normal
#536662#3
Date:
2009-07-12 08:45:15 UTC
From:
To:
The sqlite3 CLI doesn't count multi-byte characters correctly:

sqlite> create table test (id text primary key);
sqlite> insert into test values ('123456');
sqlite> insert into test values ('abcdef');
sqlite> insert into test values ('äöüäöü');
sqlite> .mode column
sqlite> .width 4
sqlite> select * from test;
1234
abcd
äö

Kind regards,

Martin

#536662#8
Date:
2009-07-12 12:39:19 UTC
From:
To:
tags 536662 unreproducible moreinfo
thanks

Hi Martin,
 I can't reproduce it with the current version in testing:
SQLite version 3.6.14.2
sqlite> create table test (id text primary key);
sqlite> insert into test values ('123456');
sqlite> insert into test values ('abcdef');
sqlite> insert into test values ('äöüäöü');
sqlite> select * from test;
123456
abcdef
äöüäöü
sqlite> .mode column
sqlite> .width 4
sqlite> select * from test;
1234
abcd
äöüä

It works as expected. Can it be your terminal that strip characters? Can
you update your version of sqlite3 to 3.6.14.2 at least?

Regards,
Laszlo/GCS

#536662#15
Date:
2013-01-02 00:17:55 UTC
From:
To:
stop
----

Hello,

Martin Godisch uses an example with the width option to highlight the
problem. However, I think this is the column mode that does not comply
with UTF-8, rather than the width option.

I still found this bug in version 3.7.13-1 for Debian testing on an x86
architecture, without modifications.

The attached script demonstrates the problem. I tested it with the linux
framebuffer, rxvt-unicode and a redirection to make sure it is not a
problem of configuration of the terminal.

Regards,

#536662#20
Date:
2013-01-02 00:24:34 UTC
From:
To: