Read resource file with spaces and cyrillic symbols in name
<p>I have a set of files attached to my project as resources. These files contain data that program reads and processes. 
That's how I do it:</p>

<pre><code>ClassLoader classLoader = Thread.currentThread().getContextClassLoader();       
InputStream inputStream = classLoader.getResourceAsStream(filename);            
packageParameters = IOUtils.toString(inputStream, "UTF-8");                     
inputStream.close();    
</code></pre>

<p>And everything is fine until I try to read files with specific names like:</p>

<pre><code>\sets\Тех. тип = 0 Сет. = 1 Комплект 1.qr
</code></pre>

<p><code>getResourceAsStream</code> returns <code>null</code> that means it can't locate this resource.</p>

<p>So, the question is: how can I read such files that contain cyrillic symbols, spaces and special symbols in names?
Tried to encode names - doesn't help. Can't convert it to URI as constructor throws an exception for illegal symbols.</p>

<p>Any ideas appreciated.
Spent some days analyzing similar answers - still don't know how to solve it.</p>