Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. hibernate corrupts character encoding when migrated to oracle with utf-16
  2. SELECT * FROM NLS_DATABASE_PARAMETERS;
  3. NLS_NCHAR_CHARACTERSET  UTF8
  4. NLS_CHARACTERSET    WE8ISO8859P1
  5.        
  6. SELECT * FROM NLS_DATABASE_PARAMETERS;
  7. NLS_NCHAR_CHARACTERSET  AL16UTF16
  8. NLS_CHARACTERSET        WE8MSWIN1252
  9.        
  10. <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  11.     <property name="dataSource" ref="dataSource"/>
  12.     <property name="hibernateProperties">
  13.         <value>
  14.  
  15.             hibernate.connection.characterEncoding=UTF16
  16.             hibernate.connection.charSet=UTF16
  17.             hibernate.connection.useEncoding=true
  18.             hibernate.connection.defaultNChar=true