This was driving me mad for a while....
Somebody put an anomaly into my data, where a Unicode
U+00A0 (non-breaking space) was put into one of my strings. This LOOKS like a space, but it will not match a real space
So, I had two strings that looked identical but didn't match.
How Neo4J confused me, is when I
RETURNed the string and copied it from a Table and then compared the string elsewhere, the non-breaking space got converted into a space instead of being left as is.
If you export the table as CSV, you do see that the non-breaking space is correctly output as UTF-8 sequence
c2 a0 which is equivalent to Unicode U+00A0
00000010 22 0a 2d c2 a0 2d |".-..-|
Below is the screen shot of my steps (in chronically reverse order).
- I created a return value with non-breaking space:
- I copied the string "- -" and put code around it to see if it was equal to "-\u00a0-"`. It return false
- I copied the string "- -" and put code around it to see if it was equal to "-\u0020-"`. It return true
It's not the end of the world but it sure tripped me up for a while.