SQLPower / wabit

Automatically exported from code.google.com/p/wabit
GNU General Public License v3.0
7 stars 8 forks source link

Saving a report with currency format stops the file from being loaded #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Lily using Windows Vista.

What steps will reproduce the problem?
1. Create a report with a result set where one column of the result set is
numeric.
2. Set the format of the numeric column to be a currency format.
3. Save the Wabit project.

What is the expected output? What do you see instead?
The file encoding is UTF-8 but the format saved starts with §. This causes
the following exception on loading the file:

java.lang.RuntimeException:
org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of
1-byte UTF-8 sequence.
    at
ca.sqlpower.wabit.dao.LoadProjectXMLDAO.loadProjects(LoadProjectXMLDAO.java:67)
    at
ca.sqlpower.wabit.swingui.action.LoadProjectsAction.loadFile(LoadProjectsAction.
java:111)
    at
ca.sqlpower.wabit.swingui.action.LoadProjectsAction.loadFile(LoadProjectsAction.
java:92)
    at
ca.sqlpower.wabit.swingui.WabitSwingSessionContextImpl$1.loadFile(WabitSwingSess
ionContextImpl.java:104)
    at ca.sqlpower.swingui.RecentMenu.openFile(RecentMenu.java:129)
    at ca.sqlpower.swingui.RecentMenu$1.actionPerformed(RecentMenu.java:148)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:627)
    at java.awt.MenuItem.processEvent(MenuItem.java:586)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:300)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:288)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300
)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException:
Invalid byte 1 of 1-byte UTF-8 sequence.
    at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
    at
ca.sqlpower.wabit.dao.LoadProjectXMLDAO.loadProjects(LoadProjectXMLDAO.java:61)
    ... 22 more

Original issue reported on code.google.com by mike892@gmail.com on 22 May 2009 at 7:02

GoogleCodeExporter commented 9 years ago
The saving and exporting code was using the system default encoding instead of 
UTF-8
encoding. This has now been changed to use UTF-8.

Original comment by ThomasOB...@gmail.com on 10 Jul 2009 at 4:25