diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GeneratorWriter.java b/jOOQ-codegen/src/main/java/org/jooq/util/GeneratorWriter.java index 24d991776e..d0d1517d8a 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/GeneratorWriter.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/GeneratorWriter.java @@ -36,7 +36,9 @@ package org.jooq.util; import java.io.File; -import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; @@ -81,9 +83,9 @@ public abstract class GeneratorWriter> { this.file = file; try { - this.writer = new PrintWriter(file); + this.writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); } - catch (FileNotFoundException e) { + catch (IOException e) { throw new GeneratorException("Error writing " + file.getAbsolutePath()); } this.sb = new StringBuilder(); diff --git a/jOOQ-test/launch/GenerationTool H2 test.launch b/jOOQ-test/launch/GenerationTool H2 test.launch index 16fdcf0992..5c92350eb2 100644 --- a/jOOQ-test/launch/GenerationTool H2 test.launch +++ b/jOOQ-test/launch/GenerationTool H2 test.launch @@ -29,5 +29,6 @@ +