Skip to content

Commit

Permalink
[#697] Encodings: Set default charset to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
opatrascoiu committed Aug 6, 2024
1 parent 53f8f7c commit de1cb8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.gs.dmn.serialization.SerializationFormat;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.Map;

Expand Down Expand Up @@ -100,7 +101,7 @@ public InputParameters(Map<String, String> inputParameters) {
this.prefix = InputParameters.getOptionalParam(inputParameters, "prefix");
this.format = SerializationFormat.valueOf(InputParameters.getOptionalParam(inputParameters, "format", "XML"));
String charsetName = InputParameters.getOptionalParam(inputParameters, "encoding");
this.charset = charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName);
this.charset = charsetName == null ? StandardCharsets.UTF_8 : Charset.forName(charsetName);

this.javaRootPackage = InputParameters.getOptionalParam(inputParameters, "javaRootPackage");
this.onePackage = InputParameters.getOptionalBooleanParam(inputParameters, "onePackage", "false");
Expand Down

0 comments on commit de1cb8a

Please sign in to comment.