Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An exception was thrown by the type initializer for FirebirdSql.Data.Common.Charset [DNET327] #338

Closed
firebird-automations opened this issue Jun 21, 2010 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: Stefano Fraccaro (druido77)

Is related to DNET374

We are developing a C#⁠ Windows.Form application. My connection string is:

ServerType=0;User=SYSDBA;Password=********;Dialect=3;Server=localhost;Port=3050;Database=/path/to/application/application.fdb;

Every time I try to open the connection to the database I receive this error.

System.TypeInitializationException: An exception was thrown by the type initializer for FirebirdSql.Data.Common.Charset ---> System.ArgumentException: Encoding name 'euc-jp' not supported
Parameter name: name
at System.Text.Encoding.GetEncoding (System.String name) [0x00000]
at FirebirdSql.Data.Common.Charset.GetEncoding () [0x00000]
at FirebirdSql.Data.Common.Charset..ctor (Int32 id, System.String name, Int32 bytesPerCharacter, System.String systemName) [0x00000]
at FirebirdSql.Data.Common.Charset.InitializeSupportedCharsets () [0x00000]
at FirebirdSql.Data.Common.Charset..cctor () [0x00000]

Application is running fine in Windows environment... but I can't connect to database in Ubuntu.
How to resolve? What's wrong?

@firebird-automations
Copy link
Author

Modified by: Stefano Fraccaro (druido77)

Version: 2.5.2 [ 10370 ]

description: We are developing an solution in http://asp.net and using the Firebird .NET Provider.
I have searched a lot on google, have downloaded the lastes version from svn and added the solution:

http://firebird.svn.sourceforge.net/viewvc/firebird/NETProvider/tags/NETProvider_2.5.1/source/FirebirdSql/Data/
with the symbols: TRACE;MONO;LINUX
But this error seems to occur on all versions.

and i still get the follow exeption
An exception was thrown by the type initializer for FirebirdSql.Data.Common.Charset
at ...OpenMyDBConnection () [0x00000] in <filename unknown>:0

The strange is that this error only occurs on a http://asp.net enviroment. On our mono desktop app this error not occur.

=>

We are developing a C#⁠ Windows.Form application and every time I try to open the connection to the database I receive this error.
My connection string is:

ServerType=0;User=SYSDBA;Password=********;Dialect=3;Server=localhost;Port=3050;Database=/path/to/application/application.fdb;

Application is running fine in Windows environment... but I can't connect to database in Ubuntu.
How to resolve? What's wrong?

environment: Suse Linux, Mono 2.6.1, http://ASP.NET => Ubuntu Linux 10.04, Mono 2.4.4

@firebird-automations
Copy link
Author

Modified by: Stefano Fraccaro (druido77)

description: We are developing a C#⁠ Windows.Form application and every time I try to open the connection to the database I receive this error.
My connection string is:

ServerType=0;User=SYSDBA;Password=********;Dialect=3;Server=localhost;Port=3050;Database=/path/to/application/application.fdb;

Application is running fine in Windows environment... but I can't connect to database in Ubuntu.
How to resolve? What's wrong?

=>

We are developing a C#⁠ Windows.Form application. My connection string is:

ServerType=0;User=SYSDBA;Password=********;Dialect=3;Server=localhost;Port=3050;Database=/path/to/application/application.fdb;

Every time I try to open the connection to the database I receive this error.

System.TypeInitializationException: An exception was thrown by the type initializer for FirebirdSql.Data.Common.Charset ---> System.ArgumentException: Encoding name 'euc-jp' not supported
Parameter name: name
at System.Text.Encoding.GetEncoding (System.String name) [0x00000]
at FirebirdSql.Data.Common.Charset.GetEncoding () [0x00000]
at FirebirdSql.Data.Common.Charset..ctor (Int32 id, System.String name, Int32 bytesPerCharacter, System.String systemName) [0x00000]
at FirebirdSql.Data.Common.Charset.InitializeSupportedCharsets () [0x00000]
at FirebirdSql.Data.Common.Charset..cctor () [0x00000]

Application is running fine in Windows environment... but I can't connect to database in Ubuntu.
How to resolve? What's wrong?

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Looks like Mono removed support for euc-jp charset.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10380 ]

Fix Version: 2.5.2 [ 10370 ] =>

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Fix Version: 2.6 [ 10371 ]

Fix Version: 2.5.3 [ 10380 ] =>

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue is related to DNET374 [ DNET374 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants