Bug #9539
closedREXML XPath UTF8 encoding problem
Description
I found some problems in REXML when processing XPath expressions with Unicode not ascii characters. I attached a sample script and a sample document. If you see the script output, you will see two different problems:
-
text() XPath function does not work properly when there is an accent or tilde character.
-
two different XPath paths, one with an accent and the other without it, are considered the same.
Thank you,
Mario Barcala
Files
Updated by kou (Kouhei Sutou) about 10 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset r45153.
-
lib/rexml/xmltokens.rb: Add missing non ASCII valid characters
to element name characters. Now, REXML name tokens exactly
match "[5] Name" in the XML spec and "[4] NCName" in the
Namespaces in XML spec. See comment about the details.
[Bug #9539] [ruby-core:60901]
Reported by Mario Barcala. Thanks!!! -
test/rexml/xpath/test_node.rb: Add tests for the above case.
Updated by kou (Kouhei Sutou) about 10 years ago
- Assignee set to kou (Kouhei Sutou)
Thanks for your report!
I've fixed it in trunk.
It was very helpul that you attach a sample script and sample XML to reproduce the problem. :-)