@@ -380,7 +380,7 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt
380380
381381 String indexClassName = SchemaTypeCodePrinter .indexClassForSystem (system );
382382
383- try (Writer out = filer .createSourceFile (indexClassName , options == null ? null : options .getCompileSourceCodeEncoding ())) {
383+ try (Writer out = filer .createSourceFile (indexClassName , options == null ? null : options .getCharacterEncoding ())) {
384384 Repackager repackager = (filer instanceof FilerImpl ) ? ((FilerImpl ) filer ).getRepackager () : null ;
385385 printer .printHolder (out , system , options , repackager );
386386 } catch (IOException e ) {
@@ -398,7 +398,7 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt
398398
399399 String fjn = type .getFullJavaName ();
400400
401- try (Writer writer = filer .createSourceFile (fjn , options == null ? null : options .getCompileSourceCodeEncoding ())) {
401+ try (Writer writer = filer .createSourceFile (fjn , options == null ? null : options .getCharacterEncoding ())) {
402402 // Generate interface class
403403 printer .printType (writer , type , options );
404404 } catch (IOException e ) {
@@ -408,7 +408,7 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt
408408
409409 fjn = type .getFullJavaImplName ();
410410
411- try (Writer writer = filer .createSourceFile (fjn , options == null ? null : options .getCompileSourceCodeEncoding ())) {
411+ try (Writer writer = filer .createSourceFile (fjn , options == null ? null : options .getCharacterEncoding ())) {
412412 // Generate Implementation class
413413 printer .printTypeImpl (writer , type , options );
414414 } catch (IOException e ) {
0 commit comments