Bug 129424 BIRT XML ODA Driver does not handle non-English strings properly
When a report is bound to an XML data source with non-English strings, those strings cannot be displayed in the report properly. Steps to reproduce the problem: . Prepare an XML file with some non-English characters in the values/attributes of its XML elements. (A sample XML file with traditional Chinese strings is attached. Those strings can also be replaced by the other non-English strings.) . Inside BIRT's Report Design Perspective, create a new report design. . Use the XML Data Source option to create a new data source with this XML file. . Create a new data set using that data source. If you use the attached XML file, specify "/library/book" for the Table Mapping, and add "/title" to the Column Mapping. Look at the Preview Results and the data in the "title" column are already scrambled. . If we keep going forward to add a single-column table and bind the title column to the table, the preview/generated results shows illegible characters. This would be a serious issue for supporting non-English languages.
data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/SaxParser.java
/*	We will override method	org.xml.sax.helpers.DefaultHandler.characters(char[], int start, int length) to
	rechieve value of an xml element.
	In the Xerces2 Java Parser 2.6.2 implementation (the one we used), the
	first argument, that is, char[], which is a cache of xml input stream, passed
	by the Xerces parser would always be of 2048 bytes in length. If a value of an
	xml element exceeds 2048 bytes, or only parts of its value being cached on the
	rear of the char array, then the method characters() will be called multiple
	times so that the whole value could be achieved.
	Based on the above consideration, we decide to cache the chars fetched from the 
	characters method and proceed them when endDocument method is called */
	private String currentCacheValue;
	private boolean stopCurrentThread;
	/**
	 * 
	 * @param fileName
	 * @param consumer
	 */
	public SaxParser( XMLDataInputStream stream, ISaxParserConsumer consumer )
	{
		inputStream = stream;
		spConsumer = consumer;
		start = true;
		alive = true;
		currentCacheValue = "";
		currentElementRecoder = new HashMap();
		stopCurrentThread = false;
	}
	/*
	 *  (non-Javadoc)
	 * @see java.lang.Runnable#run()