Check if container is set before setting charset
Because no container is set when requesting the installer
merge wip
Merge branch 'refactor-api' of https://github.com/guytarded/forkcms into refactor-api