Contact import by CSV fails when string ends with "à"
Overview
When importing a Contact with a CSV file, the strings that end with character à
are replaced by a non-printing character.
Reproduction steps
- Create CSV file with string field ending with
à
- Import Contact by CSV, and choose this file
- The file has been loaded in a temp table, and final
à
character is replaced by a non-printing character
Current behaviour
String ending with à
is broken and replaced by a non-printing character
Expected behaviour
String must remain as-it-is
Environment information
Reproduced in 5.27.7
and in dmaster
Comments
This line of code is the culprit of replacing the character:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Import/DataSource/CSV.php#L227
Included in PR:
https://github.com/civicrm/civicrm-core/pull/7813
Not sure what's the best fix for this, to avoid removing the original fix for bug:
https://issues.civicrm.org/jira/browse/CRM-17859