Column alignment wrong when using multibytr characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Column alignment wrong when using multibytr characters

Marc Baudoin
Hi,

I've encountered a problem with SQLite version 3.18.0 about how
it handles multibyte characters.

Consider this table:

CREATE TABLE film
(
        id      INTEGER         PRIMARY KEY ,
        titre   VARCHAR ( 50 )  NOT NULL ,
        sortie  DATE            NOT NULL
) ;

filled with these data:

INSERT INTO film VALUES ( 1 , 'La Traversée de Paris'  , '1956-10-26' ) ;
INSERT INTO film VALUES ( 2 , 'Les Tontons flingueurs' , '1963-11-27' ) ;
INSERT INTO film VALUES ( 3 , 'Touchez pas au grisbi'  , '1954-03-17' ) ;
INSERT INTO film VALUES ( 4 , 'Les Misérables'         , '1958-03-12' ) ;

When I run the command-line sqlite client that way :

sqlite3 -column -header exemple.db

The following query has it last column badly aligned when the
second column contains an accented (2 bytes) character, which is
counted for two bytes but dispplayed as 1 character:

sqlite> select * from film ;
id          titre                   sortie
----------  ----------------------  ----------
1           La Traversée de Paris  1956-10-26
2           Les Tontons flingueurs  1963-11-27
3           Touchez pas au grisbi   1954-03-17
4           Les Misérables         1958-03-12

Is there a parameter to fix this or is it a bug?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Column alignment wrong when using multibytr characters

Richard Hipp-3
On 5/5/17, Marc Baudoin <[hidden email]> wrote:
> Hi,
>
> I've encountered a problem with SQLite version 3.18.0 about how
> it handles multibyte characters.

Thanks for the bug report.

That problem was fixed about 19 days ago with the check-in at
https://www.sqlite.org/src/timeline?c=f508aff8d1782abdff4d which has
not yet appeared in an official release.  But you can download the
"Pre-release snapshot" from the website and use it.


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Column alignment wrong when using multibytr characters

Marc Baudoin
Richard Hipp <[hidden email]> écrit :

> On 5/5/17, Marc Baudoin <[hidden email]> wrote:
> >
> > I've encountered a problem with SQLite version 3.18.0 about how
> > it handles multibyte characters.
>
> Thanks for the bug report.
>
> That problem was fixed about 19 days ago with the check-in at
> https://www.sqlite.org/src/timeline?c=f508aff8d1782abdff4d which has
> not yet appeared in an official release.  But you can download the
> "Pre-release snapshot" from the website and use it.

Thanks!
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users