Alert message doesn't match actual message

When I record the Alert , The formats is written as follows.

assertEquals(“未填 会员帐号\r\n未填 姓名\r\n未填 邮箱”, selenium.getAlert());

But when I play,The formats is change as follows.

assertEquals(“未填 会员帐号\n未填 姓名\n未填 邮箱”, selenium.getAlert());

\r is disappear,Causing an error.

Is there any way to solve it?