When generate pojo files by hbm2java, I don't know how can I specialize a charset name in build.xml. In my case, hbm2java generates files in system encoding by default.
In org.hibernate.tool.hbm2x.TemplateProducer source, I found:
void produce(Map additionalContext, String templateName, File destination, String identifier, String fileType){
...
fileWriter = new FileWriter(destination);
fileWriter.write(tempResult);
..
I thought here may use OutputStreamWriter to generate a special encoding file instead.
|