Skip to content

Character encoding issues with places-of-worship.csv #56

@c6andy

Description

@c6andy

Steps to reproduce

For example:

  1. Go to: https://campaign-lab-constituency-explorer.c6digital.dev/constituency/E14001334
  2. Click “Places of Worship”
  3. The first listed place of worship in the list is called “���������� ������������������”

Screenshots

Image

Why does this happen

I think this happens because this file was originally encoded as ISO-8859-1, but was possibly saved as UTF-8 without re-encoding? Something like that.

Proposed solution

The importer could probably sort this out, but I don’t think that would be a future-proof solution, because I think we’d end up overfitting to the current data. We’d be better off fixing this in the source data, and then whenever new source data arrives, ensuring it’s correctly encoded as UTF-8 prior to importing.

Anything else

This reminds me that we ought to note in the README that all source data is currently expected to be encoded as UTF-8, except schools-england.csv, which is expected to be ISO-8859-1. I’ve done that in #57.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions