Index: /trunk/scripts/SyncEditorLayerIndex.groovy
===================================================================
--- /trunk/scripts/SyncEditorLayerIndex.groovy	(revision 12065)
+++ /trunk/scripts/SyncEditorLayerIndex.groovy	(revision 12066)
@@ -39,6 +39,6 @@
     static String josmInputFile = 'imagery_josm.imagery.xml'
     static String ignoreInputFile = 'imagery_josm.ignores.txt'
-    static FileWriter outputFile = null
-    static BufferedWriter outputStream = null
+    static FileOutputStream outputFile = null
+    static OutputStreamWriter outputStream = null
     def skip = [:]
 
@@ -56,13 +56,17 @@
         script.loadJosmEntries()
         if(options.josmxml) {
-            def file = new FileWriter(options.josmxml)
-            def stream = new BufferedWriter(file)
+            def file = new FileOutputStream(options.josmxml)
+            def stream = new OutputStreamWriter(file, "UTF-8")
             script.printentries(script.josmEntries, stream)
+            stream.close();
+            file.close();
         }
         script.loadELIEntries()
         if(options.elixml) {
-            def file = new FileWriter(options.elixml)
-            def stream = new BufferedWriter(file)
+            def file = new FileOutputStream(options.elixml)
+            def stream = new OutputStreamWriter(file, "UTF-8")
             script.printentries(script.eliEntries, stream)
+            stream.close();
+            file.close();
         }
         script.checkInOneButNotTheOther()
@@ -110,6 +114,6 @@
         }
         if (options.output && options.output != "-") {
-            outputFile = new FileWriter(options.output)
-            outputStream = new BufferedWriter(outputFile)
+            outputFile = new FileOutputStream(options.output)
+            outputStream = new OutputStreamWriter(outputFile, "UTF-8")
         }
     }
