REXML XPath UTF8 encoding problem
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:
1) text() XPath function does not work properly when there is an accent or tilde character.
2) two different XPath paths, one with an accent and the other without it, are considered the same.
Updated by kou (Kouhei Sutou) over 6 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 " Name" in the XML spec and " 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.