Skip to content

Decode is not unicode aware #9

@kaol

Description

@kaol

See this example program: https://github.com/kaol/servant-jsaddle-bug1

The unicode snowman will be turned into 0x03 instead of ☃ as expected. This will fail with a decode error. The UTF-16 representation of a snowman is 0x2603 which apparently gets truncated to only the least significant byte. For reference, the UTF-8 would encoding is 0xE2 0x98 0x83.

I tried to follow this bug to find out where it originates and seems like https://github.com/ghcjs/jsaddle-dom is a possible culprit. Specifically how fromJSString is implemented in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions