AFG-Polio-Data / APMIS-Project

APMIS (Afghanistan Polio Management Information System) is an supplemental Immunization Activities management system to manage the vaccination activities in the country.
https://test.afghanistan-apmis.com
GNU General Public License v3.0
4 stars 8 forks source link

Exported csv files need UTF-8 encoding #706

Closed bnygren closed 3 weeks ago

bnygren commented 1 month ago

Based on feedback from data managers, csv files that are exported from APMIS (i.e. through the Campaign Data page and elsewhere) do not use UTF-8 encoding. When viewed in Excel, Excel does not know what encoding to use and this results in garbled text for Dari/Farsi text. An example can be seen when downloading ICM supervisor monitoring checklist data that includes supervisors names. This is easy enough to correct, by opening the downloaded csv in a text editor, changing the encoding to 'UTF-8' and saving, then opening in Excel. However, to avoid this issue, the downloaded csv files should be encoded with UTF-8 directly.

Image

bnygren commented 3 weeks ago

Confirmed that Dari text paste in the web app is viewable in csv's opened with Excel. Also using Windows notepad (FWIW) thinks it is UTF 8 with BOM

lbaertlein1 commented 1 week ago

Tested a csv download from test.afghanistan-apmis.com and confirmed there is a BOM. CSVs from the live server "afghanistan-apmis.com" still do not have a BOM.

To test, use: https://validator.w3.org/i18n-checker/check#validate-by-upload+