Firebird 2.1 UTF8 trouble?
Posted: Tue 01 Feb 2011 16:59
Hi out there,
I´m an old IB/FB wolf but a newie to UniDAC and UTF8. I created (FB 2.1) a database and table like this:
create database 'database.fdb' user 'SYSDBA' password 'masterkey'
page_size 16384
default character set UTF8;
create table USUARIOS (
USUARIO_ID
varchar(20) not null
constraint USUARIOS_PK primary key,
USUARIO_NOMBRE
varchar(80) not null
constraint USUARIO_NOMBRE_BLANCO check (USUARIO_NOMBRE '')
collate UTF8 .........
My connection has the specific options:
InterBase.Charset=UTF-8 (not the Unicode one since I´m using D2007 and don´t want to use WideStrings)
and so, I expect every string read to be converted to AnsiString and every written be converted to UTF8 but that is not working. I´m making wrong assumptions here? If I enter a string like "capitán" in the application I get a malformed string exception, and if I populate the table with an external tool, the string is shown with gibberish (but correct UTF8 encoded) characters
Regards,
Alvaro Castiello
I´m an old IB/FB wolf but a newie to UniDAC and UTF8. I created (FB 2.1) a database and table like this:
create database 'database.fdb' user 'SYSDBA' password 'masterkey'
page_size 16384
default character set UTF8;
create table USUARIOS (
USUARIO_ID
varchar(20) not null
constraint USUARIOS_PK primary key,
USUARIO_NOMBRE
varchar(80) not null
constraint USUARIO_NOMBRE_BLANCO check (USUARIO_NOMBRE '')
collate UTF8 .........
My connection has the specific options:
InterBase.Charset=UTF-8 (not the Unicode one since I´m using D2007 and don´t want to use WideStrings)
and so, I expect every string read to be converted to AnsiString and every written be converted to UTF8 but that is not working. I´m making wrong assumptions here? If I enter a string like "capitán" in the application I get a malformed string exception, and if I populate the table with an external tool, the string is shown with gibberish (but correct UTF8 encoded) characters
Regards,
Alvaro Castiello