pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
i18n in JDBC driver
2+ messages / 2 participants
[nested] [flat]

* i18n in JDBC driver
@ 1999-10-11 13:42 Martin Kuba <makub@inet.cz>
  0 siblings, 0 replies; 2+ messages in thread

From: Martin Kuba @ 1999-10-11 13:42 UTC (permalink / raw)
  To: pgsql-interfaces

Hi, I want to upgrade from v6.4.2 to v6.5.2, but I have
some problems with character encoding:

In 6.4.2 the "String(bytes[])" constructor was used for
converting database 8-bit characters to Java 16-bit characters, so
client's JVM default encoding was used instead of database encoding.
I had to change the source code of the JDBC driver to use it.

Now I have found this in CHANGELOG in v6.5.2:
"Wed May 19 00:20:00 BST 1999
   - Internationalisation now done. Surprising that there's 68 error
   messages in the driver ;-)"
so I think that it should be corrected now in v6.5.2.

But in postgresql/jdbc2/ResultSet.java on line 151
there is still 
"return new String(this_row[columnIndex - 1]);"
which means that the bug is NOT corrected !

I need a client with "Cp1250" default encoding (Czech WindowsNT)
to be able to connect to a database with "LATIN2" encoding (Linux).
Now the ResultData.getString() method returns wrong characters.

So, am I missing something ? What does it mean "Internationalisation now done" ?

Martin

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: makub@inet.cz
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1  C3 48 B2 59 00 58 42 27
 http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: [INTERFACES] i18n in JDBC driver
@ 1999-10-11 14:04 Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Mount @ 1999-10-11 14:04 UTC (permalink / raw)
  To: 'Martin Kuba' <makub@inet.cz>; pgsql-interfaces

The internationalisation was with the error messages the driver
produces, not the handling/conversion of strings. In other words, if
your locale is Czech, and we have an errors.properties.cz file in the
driver, then any errors would be returned in Czech.

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.



-----Original Message-----
From: Martin Kuba [mailto:makub@inet.cz]
Sent: 11 October 1999 14:42
To: pgsql-interfaces@postgreSQL.org
Subject: [INTERFACES] i18n in JDBC driver


Hi, I want to upgrade from v6.4.2 to v6.5.2, but I have
some problems with character encoding:

In 6.4.2 the "String(bytes[])" constructor was used for
converting database 8-bit characters to Java 16-bit characters, so
client's JVM default encoding was used instead of database encoding.
I had to change the source code of the JDBC driver to use it.

Now I have found this in CHANGELOG in v6.5.2:
"Wed May 19 00:20:00 BST 1999
   - Internationalisation now done. Surprising that there's 68 error
   messages in the driver ;-)"
so I think that it should be corrected now in v6.5.2.

But in postgresql/jdbc2/ResultSet.java on line 151
there is still 
"return new String(this_row[columnIndex - 1]);"
which means that the bug is NOT corrected !

I need a client with "Cp1250" default encoding (Czech WindowsNT)
to be able to connect to a database with "LATIN2" encoding (Linux).
Now the ResultData.getString() method returns wrong characters.

So, am I missing something ? What does it mean "Internationalisation now
done" ?

Martin

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: makub@inet.cz
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1  C3 48 B2 59 00 58 42 27
 http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------

************



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-10-11 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-10-11 13:42 i18n in JDBC driver Martin Kuba <makub@inet.cz>
1999-10-11 14:04 RE: [INTERFACES] i18n in JDBC driver Peter Mount <petermount@it.maidstone.gov.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox