Revision: 3147
Author: jfuerth
Date: Thu Sep 3 14:29:32 2009
Log: Now Mondrian schemas are always exported with UTF-8 encoding.
http://code.google.com/p/power-architect/source/detail?r=3147
Modified:
/trunk/doc/ReleaseNotes.txt
/trunk/src/ca/sqlpower/architect/olap/MondrianXMLWriter.java
/trunk/src/ca/sqlpower/architect/olap/xml-to-formatter.xsl
=======================================
--- /trunk/doc/ReleaseNotes.txt Fri May 22 16:03:00 2009
+++ /trunk/doc/ReleaseNotes.txt Thu Sep 3 14:29:32 2009
@@ -1,5 +1,12 @@
Power*Architect Release Notes
+0.9.14
+
+ Bug Fixes:
+ * Now Mondrian schemas are always exported with UTF-8 encoding
+ (previously, was platform default encoding)
+
+
0.9.13-release
* Relationship labels now display vertically if there's not enough
room horizontally
=======================================
--- /trunk/src/ca/sqlpower/architect/olap/MondrianXMLWriter.java Fri Aug 15
15:26:11 2008
+++ /trunk/src/ca/sqlpower/architect/olap/MondrianXMLWriter.java Thu Sep 3
14:29:32 2009
@@ -2,7 +2,6 @@
package ca.sqlpower.architect.olap;
import java.io.File;
-import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.IdentityHashMap;
@@ -30,8 +29,8 @@
* If creating a file writer for the given file failed.
*/
public static void exportXML(File f, MondrianModel.Schema schema)
throws IOException {
- PrintWriter out = new PrintWriter(new FileWriter(f));
- out.println("<?xml version=\"1.0\"?>");
+ PrintWriter out = new PrintWriter(f, "UTF-8");
+ out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
MondrianXMLWriter writer = new MondrianXMLWriter(out);
writer.writeSchema(schema);
out.flush();
@@ -54,7 +53,7 @@
* If creating a file writer for the given file failed.
*/
public static Map<OLAPObject, String> write(File f,
MondrianModel.Schema schema) throws IOException {
- PrintWriter out = new PrintWriter(new FileWriter(f));
+ PrintWriter out = new PrintWriter(f, "UTF-8");
return write(out, schema, true, 0, new IdentityHashMap<OLAPObject,
String>());
}
=======================================
--- /trunk/src/ca/sqlpower/architect/olap/xml-to-formatter.xsl Fri Aug 15
15:26:11 2008
+++ /trunk/src/ca/sqlpower/architect/olap/xml-to-formatter.xsl Thu Sep 3
14:29:32 2009
@@ -18,7 +18,6 @@
package ca.sqlpower.architect.olap;
import java.io.File;
-import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.IdentityHashMap;
@@ -46,8 +45,8 @@
* If creating a file writer for the given file failed.
*/
public static void exportXML(File f, MondrianModel.Schema schema)
throws IOException {
- PrintWriter out = new PrintWriter(new FileWriter(f));
- out.println("<?xml version=\"1.0\"?>");
+ PrintWriter out = new PrintWriter(f, "UTF-8");
+ out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
MondrianXMLWriter writer = new MondrianXMLWriter(out);
writer.writeSchema(schema);
out.flush();
@@ -70,7 +69,7 @@
* If creating a file writer for the given file failed.
*/
public static Map<OLAPObject, String> write(File f,
MondrianModel.Schema schema) throws IOException {
- PrintWriter out = new PrintWriter(new FileWriter(f));
+ PrintWriter out = new PrintWriter(f, "UTF-8");
return write(out, schema, true, 0, new
IdentityHashMap<OLAPObject, String>());
}