Skip to content

Commit

Permalink
Use the JVM default character set when parsing DSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Brown committed Oct 27, 2023
1 parent 70f717b commit 65483a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/structurizr/cli/AbstractCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.apache.hc.core5.http.io.entity.EntityUtils;

import java.io.File;
import java.nio.charset.Charset;

public abstract class AbstractCommand {

Expand Down Expand Up @@ -64,6 +65,7 @@ protected Workspace loadWorkspace(String workspacePathAsString) throws Exception

} else {
StructurizrDslParser structurizrDslParser = new StructurizrDslParser();
structurizrDslParser.setCharacterEncoding(Charset.defaultCharset());

if (workspacePathAsString.startsWith("http://") || workspacePathAsString.startsWith("https://")) {
String dsl = readFromUrl(workspacePathAsString);
Expand Down

0 comments on commit 65483a0

Please sign in to comment.