Subject | Unicode, UTF-8 and SQL statement. (UNICODE_FSS) |
---|---|
Author | bg2g |
Post date | 2002-10-09T03:12:24Z |
Hi all,
How to store UTF-8 formatted characters into a UNICODE_FSS column?
Any special settings or SQL statement that need to be taken care off?
STORY:
Currently, i'm dealing with a multilingual java project that
associate with vietnamese characters. As the standardization
process, the vietnamese characters will be stored as UTF-8 format.
Presume that i had a table with the following structure:-
CREATE TABLE TEST(
ID INTEGER,
DESC VARCHAR(50) CHARACTER ST UNICODE_FSS,
PRIMARY KEY("ID")
);
The follwing SQL statement were executed via the Interactive-SQL.
INSERT INTO TEST VALUE('1', 'vietnamese chars'); <--OK.
INSERT INTO TEST VALUE('2', UNICODE_FSS 'vietnamese chars');<--Failed
In IB, i suppose UNICODE_FSS will support for UTF-8. Some of the
vietnamese characters will be store as ? or being omitted at all.
Note: The vietnamese characters was obtained from a UTF-8 file.
For another test, i tried to insert the UTF-8 formatted characters
into the table via datagrid in the table properties accessed from
the IBConsole version 1.0.0.326, it also give me the ? problem.
Perhaps anyone have similar experience in handling unicode
characters and firebird.
Thanks and regards,
BG.
How to store UTF-8 formatted characters into a UNICODE_FSS column?
Any special settings or SQL statement that need to be taken care off?
STORY:
Currently, i'm dealing with a multilingual java project that
associate with vietnamese characters. As the standardization
process, the vietnamese characters will be stored as UTF-8 format.
Presume that i had a table with the following structure:-
CREATE TABLE TEST(
ID INTEGER,
DESC VARCHAR(50) CHARACTER ST UNICODE_FSS,
PRIMARY KEY("ID")
);
The follwing SQL statement were executed via the Interactive-SQL.
INSERT INTO TEST VALUE('1', 'vietnamese chars'); <--OK.
INSERT INTO TEST VALUE('2', UNICODE_FSS 'vietnamese chars');<--Failed
In IB, i suppose UNICODE_FSS will support for UTF-8. Some of the
vietnamese characters will be store as ? or being omitted at all.
Note: The vietnamese characters was obtained from a UTF-8 file.
For another test, i tried to insert the UTF-8 formatted characters
into the table via datagrid in the table properties accessed from
the IBConsole version 1.0.0.326, it also give me the ? problem.
Perhaps anyone have similar experience in handling unicode
characters and firebird.
Thanks and regards,
BG.