title: Why is LUA_PATH containing a bang (!) mangled on Windows?
body: <p>I have a file <code>main.lua</code>:</p>
  
  <pre><code>require("hello")
  </code></pre>
  
  <p>and a file <code>hello.lua</code> in the directory <code>foo bar! baz</code> (with <code>!</code>) in it:</p>
  
  <pre><code>module(...,package.seeall)
  print("hello from hello.lua")
  </code></pre>
  
  <p>when I set (on Windows) the environment variable <code>LUA_PATH</code> to the directory:</p>
  
  <pre><code>set LUA_PATH="C:\Programme\Lua\5.1\foo bar! baz\?.lua"
  </code></pre>
  
  <p>I get a strange error:</p>
  
  <pre><code>C:\Programme\Lua\5.1&gt;lua main.lua
  lua: main.lua:4: module 'hello' not found:
          no field package.preload['hello']
          no file '"C:\Programme\Lua\5.1\foo barC:\Programme\Lua\5.1 baz\hello.lua
  "'
          no file '.\hello.dll'
          no file '.\hello51.dll'
          no file 'C:\Programme\Lua\5.1\hello.dll'
          no file 'C:\Programme\Lua\5.1\hello51.dll'
          no file 'C:\Programme\Lua\5.1\clibs\hello.dll'
          no file 'C:\Programme\Lua\5.1\clibs\hello51.dll'
          no file 'C:\Programme\Lua\5.1\loadall.dll'
          no file 'C:\Programme\Lua\5.1\clibs\loadall.dll'
  stack traceback:
          [C]: in function 'require'
          main.lua:4: in main chunk
          [C]: ?
  </code></pre>
  
  <p>See the very strange path <code>C:\Programme\Lua\5.1\foo barC:\Programme\Lua\5.1 baz\hello.lua</code>? What is so special about the exclamation mark (bang)? How to get that right in windows? On Mac this seems to be working fine.</p>