Postgres UTF-8 clobs with JDBC

前端 未结 2 1610
日久生厌
日久生厌 2021-01-05 06:00

Postgres JDBC driver seems to not handle UTF-8 clobs correctly. When you retrieve the clob the characters are not correct (you get ? marks for non ascii characters).

相关标签:
2条回答
  • 2021-01-05 06:47

    Adding @Type(type="org.hibernate.type.StringClobType") to the clob description in hibernate solves it for me.

    0 讨论(0)
  • 2021-01-05 07:00

    clob? You mean text or varchar, PostgreSQL doesn't have clob datatype. The PostgreSQL JDBC driver doesn't have problems with that, it would be useless without UTF8 support. It works fine over here.

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