🏠 back to Observable

FileAttachment with specific character-encoding

Hi,
I have a csv file with french accents.
When I read it with a FileAttachment I get
‘Th�me g�n�ral’ instead of ‘Thème général’

Is there a way to handle this ?
I have tried different options from d3.csv without success
Regards
Patrick

Hi Patrick,
Would you be able to share your file here so we can try figuring it out?
Thanks
Cobus

Here is my file

I sent you a suggestion (https://observablehq.com/d/92151e76ae94cfea)
The csv/tsv file should be saved as UTF-8.
I opened the file in Numbers (on Mac) and exported it as tsv with UTF-8 as the encoding and voilà, it worked.

1 Like

Indeed a problem of encoding that can be solved of the source.
I received the file and used it directly. I should have checked it before
and use UTF-8 encoding.
Thank you again

1 Like