sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Sqlc does not support utf8 for sql identifiers

Open pdenapo opened this issue 5 months ago • 0 comments

Version

1.25.0

What happened?

Sqlc does not support identifiers with utf8 characters. This are commonly used in non-English languages:

Consider the following schema:

CREATE TABLE autores (
  id  integer PRIMARY KEY,
  nombre text      NOT NULL,
  biografía  text
);

This is legal for instance in sqlite3. But sqlc version 1.25.0 gives

sqlc generate failed.

line 4:9 extraneous input 'í' expecting {')', ','}

package

schema.sql:1:1: extraneous input 'í' expecting {')', ','}

(and later versions crash at the playground with internal server error)

Relevant log output


Database schema

CREATE TABLE autores (
  id  integer PRIMARY KEY,
  nombre text      NOT NULL,
  biografía  text
)

SQL queries


Configuration


Playground URL

https://play.sqlc.dev/p/9a52c773b7cf96b50221eea4a586818be6cc06eb2b9e219e3013c95c720759da

What operating system are you using?

Linux

What database engines are you using?

SQLite

What type of code are you generating?

Go

pdenapo avatar May 12 '25 17:05 pdenapo