title: Specifying Encoding While Placing Files In InDesign Using Extendscript
body: <p>I have a script that places a Markdown file into a text frame in InDesign. Unfortunately, InDesign doesn't seem to be picking up on the UTF-8 encoding, as quotation marks and other things are ending up as <code>‚Äú</code>.</p>
  
  <p>I tried setting <code>file.encoding</code> to <code>"UTF-8"</code> based on <a href="https://stackoverflow.com/questions/29272770/getting-strange-characters-when-pasting-from-the-clipboard-into-indesign">this question</a>, all to no avail. Here's the relevant code as it stands:</p>
  
  <pre><code>var file = File.openDialog ("Select content markdown" , "Markdown:*.md", false );
  file.encoding = "UTF-8";
  myFirstTextframe.place(file);
  </code></pre>
  
  <p>How can I resolve this problem?</p>