DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.
Wednesday, February 16, 2005

Working with Character Sets

Nice introduction to using character sets: Everything You Need to Know About InterBase Character Sets

Comments:

Hi Dan,

I'm a Firebird/.NET/C# developer and I have a big problem with Charsets.

In my Firebird Db I have a table with a varchar(20, ASCII) field and this contents chars in spanish, german, etc.

Good, when I catch this field with C# Dataset I loose the special chars.

I open the connection these:
"Port=3050;"
"Dialect=3;"
"Charset=ASCII;"
"Role=;"
"Connection lifetime=15;"

Example:
Db: Matías
Web: Matmas

Why?

Thanks for readme !
There are three possibilities: a) Using NONE charset. This will keep everything as is. b) Using UNICODE_FSS charset. This is good when you are using multiple charsets in one database. c) Choosing another specific charset. See FbConnection.ConnectionString documentation.

You need to use the same charset in the database (DDL) and in the connection (connection string).
Thanks Dan,

I tried to do it before write you. When I configure like that I can't write, for example acutes, in the database fields UNICODE_FSS or NONE.

And more, If I consume the same Firebird database with Php5 the returned select is a correct ASCII field. For this reason, I think the problem stay in .Net DataSet.

It isn't?

Thanks Dan :)
Blog comments are closed.



Previous

Archives