title: Scala Spark handle files with special characters
body: <p>I have a file such as C:/aaa a+b[1234].res.1.txt and I try to process it using SparkContext, e.g.: </p>
  
  <pre><code>...
  sc.textFile(filename).cache()
  val count = cache.filter(line =&gt; line.contains("e")).count()
  ...
  </code></pre>
  
  <p>Unfortunately this raises an exception: </p>
  
  <pre><code>Input Pattern file:/C:/aaa a+b[1234].abc.1.txt matches 0 files
  org.apache.hadoop.mapred.InvalidInputException: Input Pattern file:/C:/aaa a+b[1234].res.1.txt matches 0 files
  at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:251)
  at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:270)
  </code></pre>
  
  <p>Probably this is error is due to the brackets "[" and  "]" in the filename. If I simplify the filename I receive results. How can I encode the filename to succeed the request?</p>