Updating the JS to check for non-ASCII Characters and fix the header