[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2560) Allow configuration of code page when mapping String to DB character data

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Fri Apr 13 03:46:04 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Rydahl Andersen closed HHH-2560.
------------------------------------

    Resolution: Rejected

use usertypes and/or the user forum.

> Allow configuration of code page when mapping String to DB character data
> -------------------------------------------------------------------------
>
>                 Key: HHH-2560
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2560
>             Project: Hibernate3
>          Issue Type: Improvement
>         Environment: All
>            Reporter: Greg Burcher
>            Priority: Minor
>
> When instantiating mapped String properties from the database, Hibernate currently constructs String objects without specifying what code page to use with the byte values coming from the database. This assumes that the data in the database is encoded using the same code page as the default OS code page in the environment where java is running. This is not a valid assumption.
> Hibernate should provide some way to configure the Session Factory with a default code page and/or a code page for specific String mapped properties. Maybe there is already a way to do this, but I have not found it.
> The best work-around that I have currently found is to change the mapped property from String to byte[]. This avoids the Hibernate code that incorrectly converts the bytes to a String. However, I really want the interface of a String in my application, not a byte[], so I wrap the byte[] in a class that converts to/from String on demand. I also then need to create a UserType implementation and map to that UserType.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list