duplicate check before inserting character following an escape sequence.