the 2nd ~s crashes the process when MsgStr is a unicode string.