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

Asynchroneous parse from string #4

Open
gagern opened this issue Nov 20, 2015 · 0 comments
Open

Asynchroneous parse from string #4

gagern opened this issue Nov 20, 2015 · 0 comments
Assignees

Comments

@gagern
Copy link
Owner

gagern commented Nov 20, 2015

It would be nice if we could asynchroneously parse an XML document from a string literal. Document.fromXmlAsync isn't completely up to that task since it passes NULL as the encoding argument to its xmlReadMemory call, which presumably triggers auto-detection of file encoding. So it could be that some application has a string which originally got read from a non-UTF-8 file and therefore starts with a non-UTF-8 encoding in the xml header. But it's a string, and turning that into a Buffer will use UTF-8. Performing auto-detection on that buffer will likely lead to incorrect input.

This would be needed for albanm/node-libxslt#35.

@gagern gagern self-assigned this May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant