UTF-8 for export registrants list

  • Andreas Glenthøj
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 10 months ago #32471 by Andreas Glenthøj
UTF-8 for export registrants list was created by Andreas Glenthøj
I would be a great improvement, if registrants lists were in UTF-8 format. I run a Danish website, where 1/3 of the registrants have a Danish letter (e.g æøå) in their names. They all come out quite strangely in Excel unless I manually change the ANSCI code into UTF-8 in another program... This is OK for me, but my event administrators are having problems changing the text coding...

Will this be fixed in the upcoming version?

Thank you for your help!

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #34901 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: UTF-8 for export registrants list
Hi

Could you please try the solution explained on this forum post joomdonation.com/62-general-discussion/3...rt-registration.html

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Andreas Glenthøj
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 8 months ago #35482 by Andreas Glenthøj
Replied by Andreas Glenthøj on topic Re: UTF-8 for export registrants list
That didn't work, but I instead used this solution to get is to work in Excel:

header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header("Content-disposition: attachment; filename=filename.csv");
header("Pragma: public");
header("Expires: 0");
echo "\xEF\xBB\xBF"; // UTF-8 BOM

The key was the last line (the BOM), which is necessary for Excel to recognize UTF-8. I persume that this is the important line. I found the solution here:
stackoverflow.com/questions/4348802/how-...l-will-read-properly

Please Log in or Create an account to join the conversation.

  • Andreas Glenthøj
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 6 months ago #37146 by Andreas Glenthøj
Replied by Andreas Glenthøj on topic Re: UTF-8 for export registrants list
Would this be possible to integrate the solution above (or something similar) in the next version? It removes the problem viewing UTF-8 in Excel.

It is a bit tiresome to have to update it manually with each new version... :)
The following user(s) said Thank You: Stephan Hodges

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc