Escape non-ASCII symbols correctly

Previously, `©` would be escaped as `\©`. With this change all non-ASCII symbols are correctly escaped into an pure ASCII form.