Skip to content
Browse files

Fix issue #201 by using the file.encoding system property or UTF-8 by…

… default
  • Loading branch information
ndw committed May 5, 2015
1 parent 4b222af commit 77b9ec13c5fed8098270cf4f210179ef6967ebd0
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/com/xmlcalabash/library/
@@ -1110,8 +1110,10 @@ private void doFile(String href, String base) {
store.readEntry(href, base, "application/xml, text/xml, */*", overrideContentType, new DataReader() {
public void load(URI id, String contentType, InputStream bodyStream, long len)
throws IOException {
// FIXME: Is ISO-8859-1 the right default?
String charset = HttpUtils.getCharset(contentType, "ISO-8859-1");
// Get the default charset from the file.encoding system property.
// Fall back to UTF-8 if that's not set.
String defCharset = System.getProperty("file.encoding","UTF-8");
String charset = HttpUtils.getCharset(contentType, defCharset);

TreeWriter tree = new TreeWriter(runtime);

0 comments on commit 77b9ec1

Please sign in to comment.
You can’t perform that action at this time.