Subject Re: Firebird 2.1 Character sets and Tomcat
Author iananewby
I realized I was using the 1.5 Jaybird.

However, I can't get the 2.1.6 to work with jdk 1.4.2.17 (see other thread)

Regarding dialect 1, its an existing application which I'm just trying to update at this point. There is a newer version using dialect 3 but the current problem is with the older version.

Regards
Ian

--- In Firebird-Java@yahoogroups.com, Mark Rotteveel <Avalanche1979@...> wrote:
>
> If I run this on Java 6 update 15 using Jaybird 2.1.6_JDK6 I get the
> expected result (ie WIN1252).
>
> What Java version and exact driver variant are you using?
>
> I have some remarks on your code:
> 1) calling newInstance() is not necessary (it originates somewhere in
> the past with buggy MySQL drivers)
> 2) calling DriverManager.registerDriver is unnecessary, this is done by
> the classloader when loading the FBDriver
> 3) Why are you using DIALECT 1? For most intents and purposes, DIALECT 1
> should be considered deprecated and not be used.
>
> Mark
>
> iananewby wrote:
> > Hi folks,
> >
> > I've tried the following test program:
> >
> > public static void main(String[] args) {
> >
> > try {
> > Driver driver = (Driver) Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
> > DriverManager.registerDriver(driver);
> > Properties p = new Properties();
> > p.setProperty("user","aktivate");
> > p.setProperty("password","s1v2n3f9");
> > p.setProperty("encoding","WIN1252");
> > p.setProperty("sqlDialect","1");
> > Connection con = DriverManager.getConnection("jdbc:firebirdsql://localhost/C:/!Development/Aktiv2/DataSafe/Aktiv.fdb", p);
> > System.out.println(((FBConnection) con).getIscEncoding());
> > con.close();
> > } catch (Exception e) {
> > e.printStackTrace();
> > }
> > }
> >
> > The issue is the getIscEncoding returns NONE. Shouldn't this return WIN1252 or am I going mad?
>
>
> --
> Mark Rotteveel
>