Is there a way of having Sql Server display the field in hex bytes? Similarly, could you print out the returned string as a series of hex bytes? It's possible that both strings are identical, but that the Sql Server display mechanism (and your print) are interpreting unprintable characters in different ways.