Querying WIN1251 columns, characters like é ë replaced by ?
-----------------------------------------------------------

                 Key: DNET-900
                 URL: http://tracker.firebirdsql.org/browse/DNET-900
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 7.1.1.0
         Environment: Win10,  x64/x86, .NET 4.7.2, Firebird 2.5
            Reporter: Erik Groenakkers
            Assignee: Jiri Cincura


I am working with a legacy database which uses WIN1251 text columns (don't ask 
me why). I am now trying to read data through the FirebirdClient 7.1.1.0 (and 
earlier versions) but characters like é and ë are replaced by question marks. I 
have tried connection character set NONE, UTF8 and even WIN1251 but to the same 
effect.

I tested this with WIN1252 columns, and that works fine with connection 
character set NONE, WIN1252 or UTF8. Is WIN1251 not supported?

Sample code (sensitive info removed):

using (FbConnection connection = new FbConnection(@"character set=UTF8;data 
source=localhost;initial catalog=<db path>;user id=<user>;password=<pass>")) {
                connection.Open();
                using (var command = new FbCommand(@"select id, name from 
client", connection))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            Console.WriteLine($"ID {(int)reader["ID"]}, NAME 
{(string)reader["NAME"]}");
                        }
                    }
                }
            }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to