Okay, so skip  the encoding check. If you are stupid enough to force bom
headers when you don't need them, tough shit.

Also document a bit more about how this works and why it is needed in the
readme.


On Fri, Oct 18, 2013 at 10:57 AM, Hidayet Doğan <notifications@github.com>wrote:

> In View/CsvView.php:
>
> > @@ -261,6 +267,10 @@ protected function _generateRow($row = null) {
> >  		static $fp = false;
> >  		if ($fp === false) {
> >  			$fp = fopen('php://temp', 'r+');
> > +
> > +			if ($this->viewVars['_bom'] && Configure::read('App.encoding') == 'UTF-8') {
>
> Application encoding check can be skipped but I haven't tested how BOM
> header effects on readers/writers with using another encoding than UTF-8.
> And I think forcing people to use BOM headers always with UTF-8 encoding
> may not be a good choice. This is why I added double condition for it.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/josegonzalez/cakephp-csvview/pull/20/files#r7063983>
> .
>