Skip to content

Commit

Permalink
#21: Fixed encoding problem in translation statistics. ini file is no…
Browse files Browse the repository at this point in the history
…w UTF8
  • Loading branch information
k3b committed Oct 16, 2019
1 parent 0885161 commit dc1b913
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,18 @@
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;

import de.k3b.io.DateUtil;
import de.k3b.io.FileUtils;
import de.k3b.io.ListUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand All @@ -49,6 +45,10 @@
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;

import de.k3b.io.DateUtil;
import de.k3b.io.FileUtils;
import de.k3b.io.ListUtils;

/**
* Creates a translation statistics in Markdown-format for the app from
*
Expand Down Expand Up @@ -247,9 +247,10 @@ private static Document getXml(File file) {

public TranslationStatistics() {
Date fileLimitDate = null;
FileInputStream inputStream = null;
InputStreamReader inputStream = null;

try {
inputStream = new FileInputStream(iniFile);
inputStream = new InputStreamReader(new FileInputStream(iniFile), "UTF-8");
lastLocales.load(inputStream);

fileLimitDate = getModifyDateProperty("ignore");
Expand Down
Loading

0 comments on commit dc1b913

Please sign in to comment.