Index: /trunk/scripts/SyncEditorLayerIndex.groovy
===================================================================
--- /trunk/scripts/SyncEditorLayerIndex.groovy	(revision 13618)
+++ /trunk/scripts/SyncEditorLayerIndex.groovy	(revision 13619)
@@ -102,4 +102,5 @@
         cli.q(longOpt:'josmxml', args:1, argName:"josmxml", "JOSM entries reoutput as XML file (incomplete)")
         cli.m(longOpt:'noeli', argName:"noeli", "don't show output for ELI problems")
+        cli.c(longOpt:'encoding', args:1, argName:"encoding", "output encoding (defaults to UTF-8 or cp850 on Windows)")
         cli.h(longOpt:'help', "show this help")
         options = cli.parse(args)
@@ -119,6 +120,16 @@
         }
         if (options.output && options.output != "-") {
+            String ccp = options.encoding
+            if (ccp == null)
+                ccp = "UTF-8"
             outputFile = new FileOutputStream(options.output)
-            outputStream = new OutputStreamWriter(outputFile, "UTF-8")
+            outputStream = new OutputStreamWriter(outputFile, ccp)
+        } else {
+            String ccp = options.encoding
+            if (ccp == null) {
+                String osn  = System.getProperty("os.name")
+                ccp = (osn != null && osn.contains("Windows")) ? "cp850" : "UTF-8"
+            }
+            outputStream = new OutputStreamWriter(System.out, ccp)
         }
     }
@@ -206,5 +217,5 @@
 
     void loadELIEntries() {
-        FileReader fr = new FileReader(eliInputFile)
+        def fr = new InputStreamReader(new FileInputStream(eliInputFile), "UTF-8")
         JsonReader jr = Json.createReader(fr)
         eliEntries = jr.readObject().get("features")
