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

http_open does not comply to explicitly set reply encoding #95

Open
wouterbeek opened this issue Jun 9, 2017 · 0 comments
Open

http_open does not comply to explicitly set reply encoding #95

wouterbeek opened this issue Jun 9, 2017 · 0 comments

Comments

@wouterbeek
Copy link
Contributor

wouterbeek commented Jun 9, 2017

Currently http_open/3 does not seem to comply to the encoding set by the Content-Type reply header. While the encoding is claimed to be UTF-8, the content clearly contains incorrect characters (for non-ASCII Unicode characters):

?- http_open('https://api.test.triply.cc/info', _In, [header(content_type,ContentType)]),
   json_read_dict(_In, Dict),
   stream_property(In, encoding(Enc)).
ContentType = 'application/json; charset=utf-8',
Dict = _22402{branding:_20790{description:"Linking Business to Datað\237\\221\ª",  ...
Enc = octet.

Expected: The encoding of stream In to automatically be set based on the value of the Content-Type reply header.

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

No branches or pull requests

1 participant