WIN1251 is invalid character on .Net Core projects
--------------------------------------------------

                 Key: DNET-849
                 URL: http://tracker.firebirdsql.org/browse/DNET-849
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 6.3.0.0
            Reporter: jack128
            Assignee: Jiri Cincura
            Priority: Blocker


Project:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.3.0" 
/>
  </ItemGroup>

</Project>

Code:

class Program
    {
        static void Main(string[] args)
        {
            Test();            
            Console.ReadKey();
        }

        static void Test()
        {
            var connectionString = new FbConnectionStringBuilder 
            { 
                Charset = "WIN1251",
                Database = "localhost:D:\\DataBases\\CM\\New2\\CMBASE (2).FDB",
                UserID = "SYSDBA",
                Password = "masterkey"                
            };           
            
            var connection = new FbConnection(connectionString.ToString());
            try
            {
                connection.Open();
                Console.WriteLine("Connection is successful");
            }
            catch (Exception e)
            {
                Console.Write("ERROR: ");
                Console.WriteLine(e);                
            }
            finally
            {
                connection.Close();
            }            
        }
    }

build project, run \bin\Debug\net461\MultiTargetConsoleApp.exe, output: 
"Connection is successful"   as expected
but when you run core version dotnet 
.\bin\Debug\netcoreapp2.1\MultiTargetConsoleApp.dll     output: ERROR: 
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Invalid character set 
specified

If I set charset to NONE, error is disappear.


-- 
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