Skip to content

Include unicode escape sequence in docs on String literal #232

Open
@chexxor

Description

@chexxor

I had to look into PureScript source code and test cases to learn how to input Unicode characters by code points like this.

At the same time, it might also be good to define that PS strings use UTF-16 character-encoding internally, and whatever other details that entails.

> a = "Pok\x00E9mon"
> b = "Poke\x0301mon"
> a == b
false
-- hmm... that's concerning.

Looks like swift-lang does String equality by code-points [1], not code-units like many languages do. I wonder if PureScript should treat this as a bug for fixing.

[1] https://oleb.net/blog/2017/11/swift-4-strings/

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