I wasted a few hours on this last week and another couple of hours trying to confirm exactly under which circumstances the problem happens.
The Search Core Results web part returns some standard xml elements in the results. I wanted to get the document library name for documents returned in the search results. To do this you can use the <url> and <sitename> values with the substring-after XSLT function to trim the site name off the absolute URL which then lets you use substring-before / to get the document library part of the url (ignoring any folders that may exist in the file path).
The thing with XSLT string functions is that they are case sensitive and although the full item <url> in the results retains the case of any characters used when creating site and library names, the <sitename> element sometimes converts the site url to all lower case.
On one of my servers, if the document is in a folder of a document library of a site collection that has capital letter in the site name, the site url is converted to all lowercase. For all other documents in the root folder of libraries, the site url retains the correct case. On another server, any documents in a site collection under a managed path that has an upper case letter in the url suffers this problem.
The only thing I haven't tested is a search center sub site in the same site collection as a sub site with uppercase characters in the site name.
This means that I had to convert both the <url> and <sitename> values to lower case first (now that sounds like standard programming best practice anyway).