Commit 31c7059b authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Haramonize the characer set used to talk to Z3.

There is no need to use ISO-8859-1 when we can use UTF-8 for talking to Z3,
so use that for both input/output.  Also move the UTF-8 string constant to
a constant, allowing for easy changing later.
parent 608da5c4
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -81,10 +81,10 @@ final public class CheckerRunner {
        Writer z3Input;
        try {
            // Sigh ... Java has horrible naming conversions here ...
            z3Output = new BufferedReader(new InputStreamReader(p.getInputStream(), "ISO-8859-1"));
            z3Input = new OutputStreamWriter(p.getOutputStream(), "UTF-8");
            z3Output = new BufferedReader(new InputStreamReader(p.getInputStream(), z3Charset));
            z3Input = new OutputStreamWriter(p.getOutputStream(), z3Charset);
        } catch(UnsupportedEncodingException ex) {
            throw new RuntimeException("Failed to get charset for talking to Z3!", ex);
            throw new RuntimeException("Failed to get " + z3Charset  + " charset for talking to Z3!", ex);
        }

        StringBuilder GetValueRequestBuilder = new StringBuilder();
@@ -248,4 +248,6 @@ final public class CheckerRunner {
        }
        return false;
    }

    final static String z3Charset = "UTF-8";
}