Just in case you have not heard of XML special characters, wanted to log one of my recent experiences here. Similar to HTML special characters, there are special XML characters which need to be handled in the same manner.
Recently, I happened to know that lucene search recognizes the special CML characters through their codes e.g. before performing a lucene search, apostrophe (‘) has to be replaced with its special character code x0027 and similarly a space ( ) should be replaced with the code x0020 in the string literal to be searched in repository.
The complete list of such characters is available for reference at this link.