-
Notifications
You must be signed in to change notification settings - Fork 555
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
NQuads: unicode escape issue #352
Comments
group(1) is not an option, as it's wrong for |
i think you can just use this regexp:
|
This was referenced Jan 16, 2017
This was referenced Mar 16, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I have an issue parse nquads with rdflib.
I have this string:
'Production date :: 2532\u20132503BC :: circa'
The triple is in a file (see attached) - when it is parsed by rdflib I get an error:
ValueError: chr() arg not in range(0x110000). This seems to be generated in py3compat.py.
Digging into it is seems that the regex is correctly identifying the unicode escape, but when it wants to pull it out, it grabs all of the intergers after the \u2013 which includes the '2503' characters, i.e: '\u20132503' The line that is failing is:
What does seem to work is either:
changing the m.group(0) to m.group(1) OR
using the regex for unicode escape characters as defined in the notation3.py: (https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/parsers/notation3.py):
Would this be an adequate solution?
Thanks
Josh
The text was updated successfully, but these errors were encountered: