Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 BOM #52

Closed
kicaj opened this issue Jan 11, 2016 · 4 comments
Closed

UTF-8 BOM #52

kicaj opened this issue Jan 11, 2016 · 4 comments

Comments

@kicaj
Copy link

kicaj commented Jan 11, 2016

The solution for open CSV file with dingbats characters in Microsoft Excel is add special characters before return:

Line 158:
return "\xEF\xBB\xBF" . $this->_serialize();

@josegonzalez
Copy link
Member

Can you explain what it is you are trying to do here?

@kicaj
Copy link
Author

kicaj commented Jan 17, 2016

I use Your code, I get data from database (mysql/utf8_general_ci) and create .csv file. Afer I can't open in Microsoft Excel but can in Calc OpenOffice.

Problem was in some records, it has dingbats characters, like: ❤

@dereuromark
Copy link
Member

Isnt that what _bom option already does?
https://github.com/FriendsOfCake/cakephp-csvview/blob/master/src/View/CsvView.php#L350
Did you try it with that?

@kicaj
Copy link
Author

kicaj commented Jan 20, 2016

Yes, that's it! Thanks!

@kicaj kicaj closed this as completed Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants