Fix charset handling in test cases
diff --git a/tests/site_scons/site_init.py b/tests/site_scons/site_init.py
index 676b0fb..d19bc20 100644
--- a/tests/site_scons/site_init.py
+++ b/tests/site_scons/site_init.py
@@ -28,7 +28,7 @@
     # Build command that runs a test program and saves the output
     def run_test(target, source, env):
         if len(source) > 1:
-            infile = open(str(source[1]))
+            infile = open(str(source[1]), 'rb')
         else:
             infile = None
         
@@ -98,8 +98,8 @@
 
     # Build command that checks that each pattern in source2 is found in source1.
     def match_files(target, source, env):
-        data = open(str(source[0]), 'rU').read()
-        patterns = open(str(source[1]))
+        data = open(str(source[0]), 'r', encoding = 'utf-8').read()
+        patterns = open(str(source[1]), 'r', encoding = 'utf-8')
         for pattern in patterns:
             if pattern.strip():
                 invert = False