opencitations / api

Software for creating REST API
1 stars 1 forks source link

Author names encoding problems with data obtained via https://opencitations.net/index/api/v1/metadata/ #9

Open rtournoy opened 1 year ago

rtournoy commented 1 year ago

Thanks for your work on opencitations and the APIs

I found some encoding problem with some results like this one:

https://opencitations.net/index/api/v1/metadata/10.1017/s0956796818000072'

{
        "year": "2018",
        "title": "Size-based Termination Of Higher-Order Rewriting",
        "author": "Blanqui, FrĂŠdĂŠric",
        "citation_count": "2",
        "citation": "10.1145/3285955; 10.1145/3434341",
        "reference": "[Deleted for this example]",
        "source_id": "issn:0956-7968",
        "oa_link": "",
        "page": "",
        "source_title": "Journal Of Functional Programming",
        "doi": "10.1017/s0956796818000072",
        "volume": "28",
        "issue": ""
    }

on Blanqui, FrĂŠdĂŠric

I have tried like this: curl -s -X GET --header "Accept: application/json; charset=utf-8" --header "Content-type=text/plain; charset=UTF-8" 'https://opencitations.net/index/api/v1/metadata/10.1017/s0956796818000072'

But the problem remains

Actually lots of results have problems of encoding related to authors but some are correct: e.g.

https://opencitations.net/index/api/v1/metadata/10.1145/3366551.3370348

Is it a problem related to the data or to the way I use the API?

Any advice would be appreciated

thanks

essepuntato commented 1 year ago

Hi @rtournoy,

Thanks for noticing it. At first sight, it seems to be a problem of our Index API, since the API of the original collection containing such information (i.e. OpenCitations Meta, https://opencitations.net/meta) does not have problems:

http://opencitations.net/meta/api/v1/metadata/doi:10.1017/s0956796818000072

We will work on it in these days. /cc @ivanhb @arcangelo7

rtournoy commented 1 year ago

hi @essepuntato, to avoid encoding problems, we are considering using https://opencitations.net/meta/api/v1/ instead of https://opencitations.net/index/api/v1/metadata/ but we miss oa_link :( Any thought on what would be the best approach?