The problem really sounds like Unicode character string being treated as if it were an ANSI string. Just removing the spaces (actually, probably a NUL character, '\0') is not going to be very satisfying, as it will break the moment a Unicode character comes along that doesn't map directly to an ANSI character.
Track down the original problem (probably mismatch of character encoding) and fix that. Cheers, Stuart You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.