I was just caught out by an extension php file being encoded as Dos/Windows ANSI.
When Settings::Global Settings::Enable Gzip was selected the extension frontend output was returning
to Firefox, and a blank page to IE.The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression
I changed the file encoding using Notepad++ to Unix ANSI and it fixed it.
From what I have read this is because Contao uses ob_start("ob_gzhandler") if it can to compress the files, and ob_start("ob_gzhandler") does not like what are called BOM characters (which are visually hidden, so hard to detect).
Which leads me to the question....
When making an extension, what encoding should be used for the files (php, js, tpl etc).
I also notice that sometimes when I transfer files down from the server via Filezilla and open them in Notepad++ they are not always the same encoding as they were straight from the unzipped Contao package.
Has anyone experienced or had a problem with this??
Bookmarks