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
HELP! Special Characters like ñ will convert a word into number 0 on import #2572
Comments
did any of you guys experience this one? |
Yes me too @fmsthird |
same here @fmsthird |
Try setting the input encoding to the encoding that your file is in: https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/config/excel.php#L76 |
The issue is the csv files are generated from a third part system i have no control over and came with charset=unknown-8bit so the encoding is not defined on the source file and to loop through every character the csv files contains hundreds of thousand rows which may time out before completion |
Same here @fmsthird |
Prerequisites
Versions
Description
I have a CSV file with some rows that has text/words that contain a special character like
ñ
, what happened is that when I tried to import the file the words with characters above or alike will be converted to 0. Not sure if it is related to encoding, I found some solutions in the StackOverflow but none of them seem to work.Additional Information
I am using the ToModel
use Maatwebsite\Excel\Concerns\ToModel;
To reproduce this, just try to put a special character in one of the cell of your CSV, then import it like:
Excel::import(new CsvImport, request()->file('file'));
The resulting inserted data that has a special character will be stored as 0
The text was updated successfully, but these errors were encountered: