Author: vdegtyarev
Date: Fri Jun 26 11:17:03 2015
New Revision: 1687755
URL: http://svn.apache.org/r1687755
Log:
Merge OPENMEETINGS-1221 to trunk. Languages encoded correctly to utf-8 on
Windows OS.
Modified:
openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/XmlExport.java
Modified:
openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/XmlExport.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/XmlExport.java?rev=1687755&r1=1687754&r2=1687755&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/XmlExport.java
(original)
+++
openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/XmlExport.java
Fri Jun 26 11:17:03 2015
@@ -19,7 +19,7 @@
package org.apache.openmeetings.util;
import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
@@ -61,7 +61,7 @@ public class XmlExport {
+ "This File is auto-generated by the LanguageEditor \n"
+ "to add new Languages or modify/customize it use the
LanguageEditor \n"
+ "see
http://openmeetings.apache.org/LanguageEditor.html for Details \n"
- + "###############################################";
+ + "###############################################\n";
public static Document createDocument() {
Document document = DocumentHelper.createDocument();
@@ -87,13 +87,15 @@ public class XmlExport {
XMLWriter writer = new XMLWriter(out, outformat);
writer.write(doc);
writer.flush();
+ out.flush();
+ out.close();
}
public static void toXml(File f, Document doc) throws Exception {
- toXml(new FileWriter(f), doc);
+ toXml(new FileOutputStream(f), doc);
}
public static void toXml(OutputStream out, Document doc) throws
Exception {
- toXml(new OutputStreamWriter(out, "UTF-8"), doc);
+ toXml(new OutputStreamWriter(out, "UTF8"), doc);
}
}