convert some escape codes