Added support via config for charsets other than UTF-8.
Will not work with r.js optimizing code though.