The symptom of the problem looks like \"[0m[27m[24m[J[34;1\" which on a terminal translates into the color blue.
-A
I've got the following in my .emacs
.emacs
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)