The characterset support in Jaybird (at least in org.firebirdsql.encodings.EncodingFactory is case-sensitive. This means that (java) characterset Cp1252 will match, but cp1252 will not.
Eg connecting with jdbc:firebirdsql://localhost:3051/D:/temp/testdb.fdb?charSet=UTF-8 will work, but with
jdbc:firebirdsql://localhost:3051/D:\\temp\\testdb.fdb?charSet=utf-8 will result in the following exception:
Exception in thread "main" java.lang.RuntimeException: Cannot get the value for this argument type as a string
at org.firebirdsql.gds.impl.wire.ParameterBufferBase$Argument.getValueAsString(ParameterBufferBase.java:185)
at org.firebirdsql.gds.impl.wire.ParameterBufferBase.getArgumentAsString(ParameterBufferBase.java:64)
at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:94)
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:482)
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at jdbc94.TestJDBC94.main(TestJDBC94.java:14)
Submitted by: @mrotteveel
Is related to JDBC267
The characterset support in Jaybird (at least in org.firebirdsql.encodings.EncodingFactory is case-sensitive. This means that (java) characterset Cp1252 will match, but cp1252 will not.
Eg connecting with jdbc:firebirdsql://localhost:3051/D:/temp/testdb.fdb?charSet=UTF-8 will work, but with
jdbc:firebirdsql://localhost:3051/D:\\temp\\testdb.fdb?charSet=utf-8 will result in the following exception:
Exception in thread "main" java.lang.RuntimeException: Cannot get the value for this argument type as a string
at org.firebirdsql.gds.impl.wire.ParameterBufferBase$Argument.getValueAsString(ParameterBufferBase.java:185)
at org.firebirdsql.gds.impl.wire.ParameterBufferBase.getArgumentAsString(ParameterBufferBase.java:64)
at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:94)
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:482)
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at jdbc94.TestJDBC94.main(TestJDBC94.java:14)
Commits: ac20951 36f66f5
The text was updated successfully, but these errors were encountered: