Encode characters with escape sequences instead