Oracle JDBC Euro character

后端 未结 2 901
独厮守ぢ
独厮守ぢ 2021-01-07 09:18

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

相关标签:
2条回答
  • 2021-01-07 09:54

    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.

    0 讨论(0)
  • 2021-01-07 10:15

    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.

    0 讨论(0)
提交回复
热议问题