Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
SaX,, Xerces: parse() and IOException caused by wrong URI-encoding ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Pascal Lagass?, post: 559567"] Hi, Environment: Java 1.4.1_02 OS: Windows 2000 XML-Parse: Xerces-J 2.6.0 The following snipplet functions without problem with a filename, only with standard ASCII characters (like: file.xml ...). The XML processing job is done as it should be: ------------------------ SNIPPLET -------------------------- import org.apache.xerces.parsers.SAXParser; .... public class mySaX { private mySaxContentHandler m_wch; public void parse(String uri) { ContentHandler contentHandler = new mySaxContentHandler(); try { XMLReader parser = new SAXParser(); parser.setContentHandler(contentHandler); m_wch = (mySaxContentHandler) contentHandler; parser.parse(uri); ... } catch (IOException e) { System.out.println("Fehler beim Lesen des URI: " + uri + " "+ e.getMessage()); } catch (SAXException e) { System.out.println("Fehler beim Parsen: " + e.getMessage()); } } ------------------------END SNIPPLET -------------------------- But, when I am using a filename with a name like "para_grisé.xml", then I got: ------------------------- ERROR MESSAGE ------------------- Fehler beim Lesen des URI: para_grisÚ.xml unknown protocol: e ------------------------- END ERROR MESSAGE --------------- I never encountered a problem with this before, when using a File Object or when displaying the name with a SWING component. Does anybody have encountered the same problem before? How should I reencode the URI for the parsing? Thank you very much in advance, /Pascal Lagassé Kösel GmbH & Co. KG - Über 400 Jahre Bücher mit System Wartenseestraße 11 87435 Kempten [URL]http://www.koeselbuch.de[/URL] mailto:plagasse@koeselbuch.de [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
SaX,, Xerces: parse() and IOException caused by wrong URI-encoding ?
Top