title: Using AppleScript to read code from AppleScript file (.scpt)
body: <p>I would like to get the code from an AppleScript file (.scpt) using AppleScript. I tried the obvious:</p>
  
  <pre><code>set the_file to choose file -- Assume the user chooses a .scpt file
  read the_file
  </code></pre>
  
  <p>However, the result I get if I select a script like this (as seen on AppleScript Editor):</p>
  
  <p><img src="https://i.stack.imgur.com/kmzJP.png" alt="enter image description here"></p>
  
  <p>is this:</p>
  
  <pre><code>"FasdUAS 1.101.10ˇˇˇˇ
  k
  lˇ˛ˇ˛;5 By Richard Kulesus, 2009.  Released without license!±     j By Richard Kulesus, 2009.  Released without license!
  
  
  lˇ˝
  ˇ˝ Use this for whatever!
  ±. Use this for whatever!
  lˇ¸ˇ¸OI I seriously despise code authors who copyright tiny bits of obvious code±í I seriously despise code authors who copyright tiny bits of obvious code
  lˇ˚ˇ˚PJ like it's some great treasure.  This is small and simple, and if it saves±î like it's some great treasure.  This is small and simple, and if it saves
  lˇ˙ˇ˙LF the next guy some time and trouble coding applescript I'll feel good!±å the next guy some time and trouble coding applescript I'll feel good!
  lˇ˘ˇ¯ˇ˜ˇ˘ˇ¯ˇ˜ !
   lˇˆ\"#ˇˆ\"&gt;8 Quickly change all the hot-corners to do what you want.#±$$p Quickly change all the hot-corners to do what you want.!%&amp;
  %lˇı'(ˇı'C= Particularly useful for presentations and full-screen games.(±))z Particularly useful for presentations and full-screen games.&amp;*+
  </code></pre>
  
  <p>(etc)</p>
  
  <p>and not this:</p>
  
  <pre><code>-- By Richard Kulesus, 2009.  Released without license!
  -- Use this for whatever!
  -- I seriously despise code authors who copyright tiny bits of obvious code
  -- like it's some great treasure.  This is small and simple, and if it saves
  -- the next guy some time and trouble coding applescript I'll feel good!
  --
  -- Quickly change all the hot-corners to do what you want.
  </code></pre>
  
  <p>(etc)</p>
  
  <p>Is there any workaround to this problem?</p>