Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend] Issue with encoding of the title #215

Closed
4 tasks done
Mikanebu opened this issue Feb 28, 2018 · 6 comments
Closed
4 tasks done

[frontend] Issue with encoding of the title #215

Mikanebu opened this issue Feb 28, 2018 · 6 comments
Assignees

Comments

@Mikanebu
Copy link
Member

Mikanebu commented Feb 28, 2018

Issue reported here datopian/datahub-qa#37
See https://datahub.io/joelgombin/ville_vitry_subventions_2017: the title of the page - which was passed by the CLI tool - has encoding issue, whereas the previewing of the CSV resource is fine.

Acceptance criteria

  • all information on showcase page is displayed correctly

Tasks

  • debug
  • analysis on how to fix
  • implementation

Analysis

The reason behind this problem is that browser by default using utf-8 encoding to decode data which comes originally from specstore. Tried to configure amazon s3 bucket, but unfortunately, it did not help by assigning metadata encoding: utf-8, but decoding with iso-8859-9 which translates Réunion to Réunion.
https://datahub.io/Mikanebu/test5

              "pathType": "local",
              "name": "test5",
              "format": "csv",
              "mediatype": "text/csv",
              "encoding": "ISO-8859-9",

As a result, we cannot encode using utf-8 when it decoded using different encoding.
We decided that encoding work should be handled on frontend side if we pass encoding from the backend. For example, if you take a look on GitHub files.
Preview of data looks fine: https://github.com/frictionlessdata/test-data/blob/master/files/csv/encodings/iso8859.csv
However, the original data is different: https://raw.githubusercontent.com/frictionlessdata/test-data/master/files/csv/encodings/iso8859.csv

Tested by passing encoding latin1 to the frontend manually and it worked.

The solution would be the following:

@Mikanebu Mikanebu added this to the Sprint - 12 Mar 2018 milestone Feb 28, 2018
@Mikanebu Mikanebu self-assigned this Feb 28, 2018
@zelima
Copy link
Contributor

zelima commented Feb 28, 2018

@Mikanebu can we guess encoding in frontend?

@Mikanebu
Copy link
Member Author

@zelima let's give a try

Mikanebu added a commit to frictionlessdata/frictionless-js that referenced this issue Mar 2, 2018
Mikanebu added a commit to frictionlessdata/frictionless-js that referenced this issue Mar 2, 2018
anuveyatsu pushed a commit to frictionlessdata/frictionless-js that referenced this issue Mar 2, 2018
#45)

* [descriptor-encoding][xs]: added encoding to Dataset class, so we can decode on frontend using descriptor.encoding - refs datopian/frontend#215
@Mikanebu
Copy link
Member Author

Mikanebu commented Mar 6, 2018

This should be fixed once frictionlessdata/datapackage-py#211 is merged and deployed.

@anuveyatsu
Copy link
Member

@Mikanebu can you please test it now and close if fixed

@Mikanebu
Copy link
Member Author

Mikanebu commented Mar 6, 2018

@anuveyatsu tested, it is not the correct title. I assigned Réunion, but on the showcase page, the title is Réunion. Please, see published dataset https://datahub.io/Mikanebu/hello-world

@Mikanebu
Copy link
Member Author

FIXED, now we handle encoding descriptor as well. Published test dataset worked fine https://datahub.io/Mikanebu/hello-world-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants