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

Misrendered characters in collections/admin/importextended.php #2067

Open
Atticus29 opened this issue Jan 14, 2025 · 2 comments
Open

Misrendered characters in collections/admin/importextended.php #2067

Atticus29 opened this issue Jan 14, 2025 · 2 comments
Assignees
Labels

Comments

@Atticus29
Copy link
Collaborator

Atticus29 commented Jan 14, 2025

To reproduce:
try to upload bulk associations following the docs.

Screenshot 2025-01-14 at 11 44 58 AM
@themerekat
Copy link
Collaborator

This ALWAYS happens only on the first field of the upload!

@egbot
Copy link
Member

egbot commented Jan 15, 2025

I'm guessing that this is mainly happening when uploading CSV files generated on a Mac, or any system that appends a UTF-8 BOM to the beginning of the CSV file. If so, the issue can be resolved stripping off the BOM after reading the first line. See following code for an example:

if(substr($headerArr[0], 0, 3) == chr(hexdec('EF')).chr(hexdec('BB')).chr(hexdec('BF'))){

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Organize
Development

No branches or pull requests

3 participants