Thanks to my support colleague Roland Graeff who told me about this issue at a customer today. And I consider this a pretty serious issue. It can happen that Special characters show junk in CLOB columns after upgrade to Oracle 188.8.131.52. with JDBC.
This is as bad as it sounds. Roland told me about a case where the application showed weird characters instead of German umlauts (ä, ö, ü, Ä, Ö, Ü) after an upgrade from Oracle Database 184.108.40.206 to 220.127.116.11.
Special characters show junk in CLOB columns after upgrade to Oracle 18.104.22.168 with JDBC
Roland explained to me that his customer is hitting
bug 26380097. The bug title is a bit misleading as it says “
GEORGIAN CHARACTERS DONOT DISPLAYED CORRECTLY FOR CLOB WITH MYCLOB.GETSUBSTRING“. The issue does not apply to Georgian characters only but can happen with all non-ASCII characters as far as my understanding goes. So everybody who does store non-ASCII characters in CLOBs in the database will need this patch most likely when using a JDBC application. A customer from Georgia hit this issue at first. This lead to the bug tagline.
The issue happens because the server sends CLOB data to the client expecting the client to do a conversion but the client (JDBC) does not do the conversion, and thus the server shouldn’t send it unconverted. The fix corrects this and handles the conversion of CLOBs on the server side.
You’ll get the fix automatically with Oracle Database 18c as the fix went into 18c. And there are a few one-off patches available on MOS.
If the patch is not available on top of your patch bundle for your platform, you may have to request it. Or you use the below mentioned patch bundles which include the fix.
On MOS you’ll find this note containing a pretty simple testcase:
- MOS Note: 2319655.1
Umlauts in WE8ISO8859P15 With Database 22.214.171.124 Showing Junk Characters for CLOB Column
Hence, I don’t reproduce it here. The issue does not exist with Oracle 126.96.36.199, Oracle 188.8.131.52 and Oracle 18c.
You can find other MOS Notes such as: MOS Note: 2373661.1 – Non English Characters Not Shown Correctly in JDBC Application after Upgrade of Database from 11.2 to 12.2 but they all refer to the same issue.
The fix for
bug 26380097 is included:
- In Oracle 18c
- In the October 2017 Bundle Patch for Windows
- Is supposed to be included in the July 2018 Update for Oracle 184.108.40.206
And please never forget:
When you apply a single fix or a patch bundle, you must run datapatch afterwards. Otherwise the fix may not take effect (and in this case it really doesn’t take effect unless you execute datapatch).