Twitterforce retrieves the information from twitter.com using a XML format,
which he has to process (parse) in order to access its inner information.
To process this XML, twitterforce uses XmlStreamReader. Its "nextTag"
method is unable to work with extended characters (this method is used
frequently in the application).
To avoid this problem, the current implementation preprocesses the xml
input (before it is used by the XmlStreamReader) by removing/replacing the
special characters.
This is the code section...
public virtual XmlStreamReader getReader(String xml) {
// TODO
/* This is to avoid a bug in XmlStreamReader -
* it can't handle extended characters
*/
xml = xml.replaceAll('ö', 'o');
xml = xml.replaceAll('ø', 'o');
xml = xml.replaceAll('“', '"');
xml = xml.replaceAll('”', '"');
xml = xml.replaceAll('&#[^;]*;', '');
XmlStreamReader r = new XmlStreamReader(xml);
r.setCoalescing(true);
r.nextTag();
return r;
}
When the nextTag method reads an extender character, it skips all the
information contained in that tag. The issue seems solvable by changing the
way the xml is handled, i think the problem seems to be the way
XmlStreamReader is used, not the class itself.
Original issue reported on code.google.com by
zetavill...@gmail.comon 23 Oct 2009 at 7:46