sqlite> select hex(id) from operators; C382C2ACC382C2ACC382C2AC This should show three characters of values "C2AC", and when I read from the DB and display on an HTML page I do see " ???"
It looks like additional data has been added? -----Original Message----- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: 17 February 2016 13:39 To: SQLite mailing list Subject: Re: [sqlite] Possible error using length on UTF-8 characters On 2/17/16, Glyn Jones <glynj at bsquare.com> wrote: > My database is configured with encoding "UTF-8". > I have a table with a constraint check for 20 characters on a column. > This mostly works, but sometimes has some strange behaviour. > > One character in particular has caused a problem. The hex value is > "C2AC" - the "NOT SIGN (U+00AC)". > Hopefully the character will appear between the quotes "?". > > When I insert this character into the table, it will only allow ten > characters to be input. > > If I do "select length(name) from myTable;" the result shows that each > of the "C2AC" characters is counted as two characters. > What does "select hex(name) FROM myTable" show? -- D. Richard Hipp drh at sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users