How to handle improper encoding / encoding conversion in Importer Actions?
clients provide csv files that are encoded with windows-1255, however the importer should be able to convert the encoding to utf-8. Usually,
mb_convert_encoding
would do the trick, however I am unsure how to apply this to the csv importer action.
Any hints?3 Replies
I had this same thing recently and told my client to make sure they export CSV files utf8 encoded. I would be interested as well to see if there is a way to accept them and convert it on the fly.
Just apply the encoding during the cast. https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import#casting-state
tried that already, basically its failing when creating a queue job payload. The payload itself looks fine though