You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jan-Philip Gehrcke (JIRA)" <ji...@apache.org> on 2017/10/11 11:55:02 UTC

[jira] [Commented] (MESOS-2013) Slave read endpoint doesn't encode non-ascii characters correctly

    [ https://issues.apache.org/jira/browse/MESOS-2013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200144#comment-16200144 ] 

Jan-Philip Gehrcke commented on MESOS-2013:
-------------------------------------------

What is the /file/read endpoint expected to emit, by design?

Since it reads from a file I would expect it to emit a raw byte sequence, straight from that file.

Why do we even talk about the concept of characters and text in this context?

If the part of the Mesos code that reads the file contents makes any assumption about the file contents (such as that it contains text encoded via UTF-8) then of course these assumptions can easily be violated.

> Slave read endpoint doesn't encode non-ascii characters correctly
> -----------------------------------------------------------------
>
>                 Key: MESOS-2013
>                 URL: https://issues.apache.org/jira/browse/MESOS-2013
>             Project: Mesos
>          Issue Type: Bug
>          Components: json api
>            Reporter: Whitney Sorenson
>            Assignee: Anand Mazumdar
>
> Create a file in a sandbox with a non-ascii character, like this one: http://www.fileformat.info/info/unicode/char/2018/index.htm
> Hit the read endpoint for that file.
> The response will have something like: 
> data: "\u00E2\u0080\u0098"
> It should actually be:
> data: "\u2018"
> If you put either into JSON.parse() in the browser you will see the first does not render correctly but the second does.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)