The context:I currently use a mapping file for a Java class that has a Japanese (with kanjis) name, as well as some of its attributes.
The mapping file uses the same Japanese Strings, escaped with backquotes. Mapped tables and column names also use japanese characters (kanjis or hiraganas).
I use <hibernatetool> in a Ant file, with the following setting of hbm2ddl:
Code:
<hbm2ddl export="true" format="true" outputfilename="DBSchema.ddl"/>
I need both to create the schema in the database (a MySQL) and in a text file.
The issue:I have no issue creating the DB schema that contains table and column names with japanese characters, provided that I use the option hibernate.connection.characterEncoding=UTF-8.
However, the generated DDL file doesn't look good, since I obtain something like that:
Code:
create table `?` (
`ID_???` varchar(255) not null,
`????` varchar(255),
primary key (`ID_???`)
);
Is there any way to keep the right encoding for the japanese characters in the generated DDL file? I found nothing about this concern in the documentation.
Thanks in advance,
Arnaud