views:

850

answers:

2

We have a problem with the Euro character when saving and retrieving it from a Oracle 10g using the Oracle 10.2.0.3 JDBC driver. The problem only occurs during a JUnit test running under Linux. The Euro characters returned from database after saving are total screwed up. Oracle has been configured to use character set "WE8MSWIN1252". Could it be that Linux cannot work with this character set?

+4  A: 

It's quite possible; code page 1252 is Microsoft's own extension of ISO-8859-1 (a.k.a. Latin-1), and it's rarely used on Linux, which tends to use the latter. The euro symbol is not part of Latin-1, that may be why it can't be displayed properly on Linux. Can you not use UTF-8? It will work the same way on both sides.

Arthur Reutenauer
+3  A: 

It's not a Linux thing. It's a known Oracle bug in the retrieve code of the jdbc driver. There's a patch available but you'll need access to Oracle Metalink to download it. The other alternative suggested there is to use the OCI driver instead of the thin one. That may or may not be an option for you.

EDIT:

This bug, which existed in the 10.2.0.3 driver, is fixed in the 10.2.0.4 jdbc driver.

Alohci