I am trying to import a csv file using parsecsv-for-php
library.The given csv file is in Catalan language
.
The thing is that when i just try to create nodes with given csv data it is throwing me this error like this while importing PDOException: in field_sql_storage_field_storage_write() (line 448 of /modules/field/modules/field_sql_storage/field_sql_storage.module).
To resolve this issue, what i did is that used utf8_encode function for each fields and avoided that error.
After successfully importing, the issue over here is that, this is the body text in csv
Thomas Alva Edison va anunciar la invenció del fonògraf l’any 1877, fent una demostració aquest mateix any. L’any 1878 el va patentar als Estats Units. Inicialment per enregistrar va fer servir cilindres de cartró recoberts d’estany, per finalment utilitzar cilindres de cera sòlida. Aquests van ser comercialitzats l’any 1889. La competència amb els discos sonors va acabar per eliminar els cilindres de cera cap els anys 1920s. Tot i així van sobreviure uns anys més com a suports d’enregistrament a oficines amb el dictàfon.
and the imported body text in the drupal i have displayed as image
If u compare both u will know there are certain differences in the body text such as
l`any in csv body text is getting imported in drupal as lany
d`estany is getting imported in drupal as destany
d`enregistrament is getting imported in drupal as denregistrament
I just want the same text to imported in drupal too with out missing any symbols or special characters. what am i doing wrong.
I have attached the my uploaded csv file formats too.
Only this character(') is not coming up properly in drupal.Any help on this is really appreciated.Thanks in advance