-
Notifications
You must be signed in to change notification settings - Fork 565
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
Correctly handle \u in Notation 3 files. #426
Conversation
It was using case insensitive regex, so it was mistaking \u and \U.
hmm, from what you write and the changes this seems legit, but other tests now fail... @gromgull you wrote that :p |
It was using case insensitive regex, so it was mistaking \u and \U.
… Add correct case for prefix escape in unicode expansion in litterals
Hello, I was encountering the same problem and was about to apply the exact same correction when I found this pull request. Ideally, I would like to add a pull request to this pull request, but i do not quite know how to do it. Regards, |
…scape-n3 This should have an extra commit that might fix some tests
@ymph I have merged that commit into this branch. The Travis CI tests mostly pass, except for the python 3.4 one, which failed due to a network problem of accessing github |
@rory Thank you very much, this is certainly the best way. Regards, |
re-running the test... |
correctly handle \u and \U in n3 files
It was using case insensitive regex, so it was mistaking \u and \U.
Sec 6.4 of the W3C spec (http://www.w3.org/TR/turtle/#sec-escapes) says that it's either \uXXXX (4 chars) or \UXXXXXXXX (8 chars). The current code uses a regex, but the regex has the case-insensitive flag set. So if there is a \uXXXX in the turtle file, the 8 character regex for \U will match and it'll try to pull in 8 character (rather than 4).
I've included tests that demostrate this.