Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cxsd fails silently with unknown encoding #32

Open
machinagod opened this issue Dec 20, 2023 · 0 comments
Open

cxsd fails silently with unknown encoding #32

machinagod opened this issue Dec 20, 2023 · 0 comments

Comments

@machinagod
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant