The real answer is you need to set the escape character to '\': SET ESCAPE ON
The problem may have occurred either because escaping was disabled, or the escape character was set to something other than '\'. The above statement will enable escaping and set it to '\'.
None of the other answers previously posted actually answer the original question. They all work around the problem but don't resolve it.