I have a model.xml file which I have placed in a directory /home/huma/abäßö. But when I parse this file I get a MalformedURLException. Strangely, if the same file is moved to the location /home/huma, I don't get any exception. To summarize, if the xml file is in some directory that contains non-english characters, I am getting a MalformedURL exception. Is there some work-around? Can someone help me with this? 
<br><br>Here is the code snippet:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final String DEF_ENC = &quot;UTF-8&quot;;&nbsp;&nbsp;&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String str = new String(&quot;ab\u00e4\u00df\u00f6&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String newStr = null;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; newStr = new String(
str.getBytes(DEF_ENC), DEF_ENC);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; str = &quot;/home/huma/&quot; + newStr + &quot;/model.xml&quot;; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String fileName = null;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fileName = new String(str.getBytes(DEF_ENC), DEF_ENC);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; File file = new File(fileName);
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; File parent = file.getParentFile();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; InputStream iStream = null;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; iStream = new FileInputStream(file);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; InputSource is = new InputSource(iStream);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(parent != null)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {  <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; is.setSystemId(parent.toURL().toString());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SAXBuilder saxbuilder = new SAXBuilder(true);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Document doc = saxbuilder.build
(is);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Element root = doc.getRootElement();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String version = root.getAttributeValue(&quot;schemaVersion&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;version: &quot; + version);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } 
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; catch (FileNotFoundException e1) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e1.printStackTrace();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; catch (UnsupportedEncodingException e) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.printStackTrace();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } catch (MalformedURLException e) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.printStackTrace();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } catch (JDOMException e) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.printStackTrace();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } catch (IOException e) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.printStackTrace();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br><br>This is the exception I am getting:
<br><br>java.net.MalformedURLException: no protocol: model.dtd<br>&nbsp;&nbsp;&nbsp; at java.net.URL.&lt;init&gt;(URL.java:537)<br>&nbsp;&nbsp;&nbsp; at java.net.URL.&lt;init&gt;(URL.java:434)<br>&nbsp;&nbsp;&nbsp; at java.net.URL.&lt;init&gt;(URL.java:383)<br>&nbsp;&nbsp;&nbsp; at 
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.XMLParser.parse
(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.jdom.input.SAXBuilder.build(SAXBuilder.java
:453)<br>&nbsp;&nbsp;&nbsp; at ModelTest.main(ModelTest.java:47)<br><br><br>