help to better help you:
Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!
Export issue
Export issue
2 days 4 hours ago
Hi
When I export users from backend event page - UTF8 characters used in user profile names, like danish letters ÆØÅ comes out wrong.
From eg this link (administrator/&view=attendees&eventid=2)
If I export as an admin from "Manage Attendees" in frontend, all comes out just fine.
When I export users from backend event page - UTF8 characters used in user profile names, like danish letters ÆØÅ comes out wrong.
From eg this link (administrator/&view=attendees&eventid=2)
If I export as an admin from "Manage Attendees" in frontend, all comes out just fine.
Please Log in or Create an account to join the conversation.
Re: Export issue
1 day 3 hours ago - 1 day 3 hours ago
Please modify the export function in the file:
\administrator\components\com_jem\controllers\attendees.php
(starting from line 93). Replace it with the following improved version that properly handles UTF-8 encoding and special characters.
Tell me if this code work for your case.
\administrator\components\com_jem\controllers\attendees.php
(starting from line 93). Replace it with the following improved version that properly handles UTF-8 encoding and special characters.
Code:
/**
* Function to export
*/
public function export()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
header('Content-Description: File Transfer');
header('Content-Type: text/csv; charset=utf-8');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="attendees_'.date('Y-m-d').'.csv"');
header('Content-Transfer-Encoding: binary');
header('Pragma: no-cache');
$model = $this->getModel('attendees');
$model->getCsv();
jexit();
}
Tell me if this code work for your case.
Last edit: 1 day 3 hours ago by McKillo.
Please Log in or Create an account to join the conversation.
Re: Export issue
1 day 1 hour ago
when I test with EXCEL, I get "Plätze" and "Freitag, 28. März 2025 11:58"! The same is with Names like Lærke Unternährer will be in Excel "Lærke Unternährer"
with CSV it's ok.
with CSV it's ok.
Please Log in or Create an account to join the conversation.
Re: Export issue
1 day 1 hour ago - 1 day 1 hour ago
Thanks for answer. Unfortunately I still got same output looking strange. But I was happy with the new filenaming also !
In CSV it looks fine with both old and new export.
So I played with the function. with this one I managed to make it work with excel.
public function export()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
header('Content-Description: File Transfer');
header('Content-Type: text/csv; charset=utf-8');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="attendees_'.date('Y-m-d').'.csv"');
header('Content-Transfer-Encoding: binary');
header('Pragma: no-cache');
echo "\xEF\xBB\xBF"; // Add BOM
$model = $this->getModel('attendees');
$model->getCsv();
jexit();
}
Note that I already have this setting set to Yes: "Insert BOM for conversion to UTF-8 on export"
In CSV it looks fine with both old and new export.
So I played with the function. with this one I managed to make it work with excel.
public function export()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
header('Content-Description: File Transfer');
header('Content-Type: text/csv; charset=utf-8');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="attendees_'.date('Y-m-d').'.csv"');
header('Content-Transfer-Encoding: binary');
header('Pragma: no-cache');
echo "\xEF\xBB\xBF"; // Add BOM
$model = $this->getModel('attendees');
$model->getCsv();
jexit();
}
Note that I already have this setting set to Yes: "Insert BOM for conversion to UTF-8 on export"
Last edit: 1 day 1 hour ago by harpiks.
Please Log in or Create an account to join the conversation.
Re: Export issue
1 day 1 hour ago
@harpiks:
with your version and "Insert BOM"=Yes it works for me in EXCEL and in CSV (notepad++)
with your version and "Insert BOM"=Yes it works for me in EXCEL and in CSV (notepad++)
Please Log in or Create an account to join the conversation.
Re: Export issue
1 day 16 minutes ago
Microsoft APP need BOM un CSV. I think that JEM should add BOM in export csv file.
I will add a commit the code and with BOM. Next JEM version will include it.
I will add a commit the code and with BOM. Next JEM version will include it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.479 seconds