
Untitled
By: a guest on
Aug 1st, 2012 | syntax:
None | size: 0.69 KB | hits: 29 | expires: Never
hibernate corrupts character encoding when migrated to oracle with utf-16
SELECT * FROM NLS_DATABASE_PARAMETERS;
NLS_NCHAR_CHARACTERSET UTF8
NLS_CHARACTERSET WE8ISO8859P1
SELECT * FROM NLS_DATABASE_PARAMETERS;
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_CHARACTERSET WE8MSWIN1252
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<value>
hibernate.connection.characterEncoding=UTF16
hibernate.connection.charSet=UTF16
hibernate.connection.useEncoding=true
hibernate.connection.defaultNChar=true