Skip to content

Incorrect conversion from TEXT to INTEGER when text is a number followed by a trailing non-breaking space #3679

@LeMikaelF

Description

@LeMikaelF

SQLite converts something like '12' || char(160) (non-breaking space) into an integer, but Turso does not.

Turso:

turso> CREATE TABLE nb1(i INTEGER);
turso> INSERT INTO nb1 VALUES ('12' || CHAR(160));
turso> SELECT TYPEOF(i), LENGTH(i) FROM nb1;
┌────────────────┬────────────────┐
│ TYPEOF (nb1.i) │ LENGTH (nb1.i) │
├────────────────┼────────────────┤
│ integer        │              2 │
└────────────────┴────────────────┘

SQLite:

sqlite> CREATE TABLE nb1(i INTEGER);
sqlite> INSERT INTO nb1 VALUES ('12' || CHAR(160));
sqlite> SELECT TYPEOF(i), LENGTH(i) FROM nb1;
text|3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions