title: Running Tika through tika-python in Windows produces encoding errors
body: <p>I have python code that extracts text from pdf files using Tika Server through tika-python. It then stores the resulting output in individual json files.</p>
  
  <p>The command I run to execute my script is </p>
  
  <pre><code>python extraction.py &lt;full path to some local directory&gt;
  </code></pre>
  
  <p>I'm using python 3.5</p>
  
  <p>It works perfect in different MacBookPro computers. 
  It doesn´t work as expected in Windows, even using up-to-date Windows 10.</p>
  
  <p>Some pdf files are processed, others produce an error such as:</p>
  
  <pre><code>'charmap' codec can't encode characters in position 3648-3649: character maps to &lt;undefined&gt;
  </code></pre>
  
  <p>I have tried changing the Code Page to 65001 and changing console font to Lucida Console, based on other questions posted on Stack Overflow, including 388490 (<a href="https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how">Unicode characters in Windows command line - how?</a>) and 14109024 (<a href="https://stackoverflow.com/questions/14109024/how-to-make-unicode-charset-in-cmd-exe-by-default">How to make Unicode charset in cmd.exe by default?</a>) and 1259084 (<a href="https://stackoverflow.com/questions/1259084/what-encoding-code-page-is-cmd-exe-using">What encoding/code page is cmd.exe using?</a>).</p>
  
  <p>I also tried installing ConEmu (<a href="http://conemu.github.io/en/UnicodeSupport.html" rel="nofollow noreferrer">http://conemu.github.io/en/UnicodeSupport.html</a>) and changing the default encoding for all consoles.</p>
  
  <p>Other references mention win_unicode_console (<a href="https://github.com/Drekin/win-unicode-console" rel="nofollow noreferrer">https://github.com/Drekin/win-unicode-console</a>) but the python patch recommended instructions are not working in my machine. </p>
  
  <p>I use Anaconda as my python distribution.</p>
  
  <p>I am interested in knowing how to be able to run my python code in Windows without having these encoding problems. From what I have read, this is not a problem with my python code nor with Tika Server but rather a Windows encoding issue.</p>
  
  <p>Thank you all,</p>
  
  <p>German</p>