views:

596

answers:

1

How do I set the character encoding for a specific table? E.g:

CREATE TABLE COMMENTS (
    ID INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL,
    TXT LONGVARCHAR,
    PRIMARY KEY (ID)
)

By default it's encoded as ASCII but I'd rather use UTF-8 for this one table.

A: 

Are you sure that it's encoded as ASCII by default? My reading of it was that it's UTF-8 by default, though I'm open to correction here.

If it's a TEXT table you'll can specify the encoding for the table

SET TABLE mytable SOURCE "myfile;encoding=UTF-8"
Glen