I'm having a curious problem saving data that includes a £ symbol as a single character in a String variable and I'm not sure how to solve..
When saved, the database field actually contains '£' and not '£'. If I debug the code, immediately prior to the save, the POJO contains '£' so I am certain it is some Hibernate feature that is adding the extra symbol.
The .hbm.xml defines the property as:
Code:
<property name="currency" type="string">
<column length="3" name="CURRENCY" not-null="false"/>
</property>
The POJO defines the proerty as:
Code:
private String currency; // Size: 3.0, Nullable:true
The database is a Pervasive database for which I have declared a new PervasiveDialect.
The dialect includes the entries:
Code:
registerColumnType(Types.VARCHAR, "char($1)");
registerColumnType(Types.VARCHAR, "varchar($l)");
Any suggestions to help me track down the cause and solution to this problem would be most welcome.