Skip to content

Special Unicode characters not allowed is a bit broad #342

Description

@Geod24

Hi,
I was dealing with some foreign JSON that contains user-provided strings, and hit this error:

dyaml/reader.d(116): Unable to open /home/mlang/.dub/index/hu/eh/hunt-cache for YAML loading: Special unicode characters are not allowed

The file in question is:

{
    "categories": [
        "library.data"
    ],
    "commitID": "9da269e338f50b2ef37d1bf5d23fd1fbf9338a92",
    "dateAdded": "2018-08-28T10:18:57",
    "description": "A Powerfull Cache library for D. Support memoryã\200\201redisã\200\201memcached backend.",
    "documentationURL": "",
    "id": "5b850571c47a932b153fb7ba",
    "name": "hunt-cache",
    "owner": "54737fb44624296c3400206c",
    "repository": {
        "kind": "github",
        "owner": "huntlabs",
        "project": "hunt-cache"
    }
}

Extracted from https://github.com/huntlabs/hunt-cache/
In this instance, it seems a bit overzealous of D-YAML to validate that all the data is UTF-8, as that string could be handled by the program. Is it expected ?

Activity

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

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