Especially, portage outputs ansi escape sequences with TERM=dumb which it shouldn't. See bug 298545 comment #5 and following.
Thanks, this should be fixed in svn r15191.
This is fixed in 2.1.7.17 and 2.2_rc62.