Accents and apostrophes

Created on 28 August 2019, over 5 years ago
Updated 10 May 2023, almost 2 years ago

I was doing some work on exporting to CSV from a view in a french site, and I had some issues with apostrophes in some cases, for example, this french string is displayed (correctly) on the views admin page:

Galerie d'exploration

When exported, it is converted as:

Galerie d'exploration

I took a look at the file vbo_export.module, line 156, and the call to html_entity_decode() seems ok:

$action_data['rows'][$index][$field_id] = html_entity_decode(strip_tags($action_data['rows'][$index][$field_id]));

but I had to add a few extra arguments on the call for fixing this issue:

$action_data['rows'][$index][$field_id] = html_entity_decode(strip_tags($action_data['rows'][$index][$field_id]), ENT_QUOTES | ENT_XML1, 'UTF-8');

Not sure if this is the right approach to fix this (or if anyone is having the same issue as well) but It's worth to mention this just in case (patch attached)

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024