| OK, I am doing tests for migrating to EDB 9.5 database (Postgres Plus Advanced Server). My table has a CLOB field, this field will contain some special characters. Their Unicode encoding is greater than 255. When I stored in the database I found that these characters cannot be stored correctly, the Unicode high 8 bits are lost. When debugging the code I found the following reasons: 1. EDB Driver's Connection does not implement createClob, hibernate used ClobProxy. 2. ClobProxy::getAsciiStream will be called. It wraps the Reader with ReadInputStream and returns an InputStream 3. If there are special characters, InputStream's read () return value will be greater than 255. (the javadoc say the range should be 0-255) 4. EDB Driver is handled as a single byte, resulting in data loss. |