Replace some characters with defined characters