Skip to content

cxsd fails silently with unknown encoding #32

Description

@machinagod

When running cxsd against a XSD file using a non-supported encoding in libexpat (example here), csxd will fail with the following error:

typeerror: Cannot read properties of undefined (reading 'id')

Supported encodings in libexpat are (from here):

There are four built-in encodings in Expat:

UTF-8
UTF-16
ISO-8859-1
US-ASCII

I believe this is caused by node-expat not supporting the Unknown Encoding parser.

Reencoding the file in UTF-8 or hard setting the parser encoding on the Parser initialization (on my fork, here) allows the parser to properly complete.

Recording this issue as a helper for others suffering the same issue.

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