title: Compiling LaTeX from notepad++ and opening with sumatra. ForwardSearch doesn't work if file path contains umlauts
body: <p>I've had this small problem for quite some time now and I haven't been able to find a solution even after excessive googling. 
  In <a href="http://johnbruer.com/2013/05/21/latex-editing-using-notepad/" rel="nofollow noreferrer">this guide</a> it is described how LaTeX can be written and compiled using npp++ and nppExec together with SumatraPDF. </p>
  
  <p>Through some clever scripts and the use of DDE commands (through <a href="http://www.istri.fr/spip/zip/CMCDDE.zip" rel="nofollow noreferrer">CMCDDE.exe</a>), it is even possible to use sumatra's ForwardSearch to jump back and forth from the .tex to the .pdf. Everything works great, <strong>unless</strong> the path to the .tex file contains a character that's not in the English alphabet (for example åäö). </p>
  
  <p>The CMCDDE command then fails because the path sent to sumatra's ForwardSearch reads (for example) <code>C:\†„”</code> instead of <code>C:\åäö</code>. This has to be an encoding issue and I haven't been able to find a working solution. </p>
  
  <p>So, if I have this .tex file <code>C:\åäö\MWE.tex</code> with</p>
  
  <pre><code>\documentclass{article}
  \begin{document}
  Hello World!
  \end{document}
  </code></pre>
  
  <p>it won't open correctly when using the batch script described in the <a href="http://johnbruer.com/2013/05/21/latex-editing-using-notepad/" rel="nofollow noreferrer">link above</a>. These are the problematic batch file lines:</p>
  
  <pre><code>::Writes the commands that are to be executed using CMCDDE.exe (through cmcdde.tmp)
  echo SUMATRA&gt;"%~dp1build\cmcdde.tmp"
  ::%~dp1build transforms into C:\åäö\build for the MWE
  echo control&gt;&gt;"%~dp1build\cmcdde.tmp"
  echo [ForwardSearch("%~dp1build\%~n1.pdf", "%~f1", %2, 0, 0, 0)]&gt;&gt;"%~dp1build\cmcdde.tmp" 
  :: This gives the following line in cmcdde.tmp: [ForwardSearch("P:\Documents\†„”\build\MWE.pdf", "P:\Documents\†„”\MWE.tex", 3, 0, 0, 0)] (in ANSI encoding)
  
  "P:\Documents\localtexmf\cmcdde.exe" @"%~dp1build\cmcdde.txt"
  :: This fails because the path P:\Documents\†„”\build doesn't exist (P:\Documents\åäö\build does)
  </code></pre>
  
  <p>Ideas I've had and tried:</p>
  
  <ul>
  <li>I tried changing the encoding by using chcp 65001 and chcp 865 but
  haven't been able to get it to work.  </li>
  <li>I have also tried using a
  <a href="https://stackoverflow.com/questions/23087463/batch-script-to-find-and-replace-a-string-in-text-file-within-a-minute-for-files">search and replace
  script</a> to go through the cmcdde.tmp file before executing it but it didn't
  succeed (I'm not sure which signs I should search for to exchange for
  åäö, †„” or Ã¥Ã¤Ã¶ or ├Ñ├ñ├Â or other?)  </li>
  <li>I have also tried putting
  cmd /c or cmd /a /c before the echo commands (as sort of described
  <a href="https://sourceforge.net/p/npp-plugins/discussion/672146/thread/87237314/" rel="nofollow noreferrer">here</a>)
  but it doesn't seem to make a difference.</li>
  </ul>
  
  <p>Please let me know <s>if something</s> which parts of the question that are unclear.</p>