Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

API doesn't handle UTF-8 characters correctly. #43

Open
@bramp

Description

@bramp

I tried setting some math characters (e.g 'μ') in a title of a figure, like so:

    var figure = {
      layout: {
        title: 'Normal (μ = 0, σ = 1.0)',
      }
    };

However, when I call plotly.getImage(figure, ...) a error is returned and it looks like the server returned a "500 Internal Server Error".

When I use the graph builder on the plot.ly site, I see that Chrome POSTs JSON in the form title: 'Normal (\u03bc = 0, \u03c3 = 1.0)', however Node.js seems to send it literally title: 'Normal (μ = 0, σ = 1.0)'. Reading the JSON spec, how Node.js is sending it is valid, however, hacking the plotly/index.js, and changing the output of JSON.stringify to use \u0XXX notation seems to work.

So please either change your Node.js API to encode in a way that is suitable, or please change your server to accept all valid JSON.

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