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.
Note that many of these chars don’t need escaping in JS regular expressions.