Unicode in an Emacs regular expression
Solution 1:
This requires enable-recursive-minibuffers
is set to non-nil:
M-x replace-regexp RET C-x 8 RET 202e RET RET C-x 8 RET 202d RET RET
Solution 2:
-
Add the following piece of emacs Lisp code at the beginning of the buffer:
(while (re-search-forward "\u202e" nil t)
(replace-match "\u202d")) Place the cursor just after the last parenthesis and type C-xC-e to execute the code.
Solution 3:
M-x replace-regexp RET \u202e RET \u202d
Solution 4:
Type the following:
M-% C-q 20056 RET RET C-q 20055 RET RET
C-q followed by an octal number and RET will insert the character represented by the octal number and discard the RET. To quickly convert hex to octal, type #x202e
in a M-: prompt, which will print the resulting number in decimal, octal, and hex.
To enable easier input of decimal numbers, a la GTK's C-S-u binding, I use this in my .emacs
:
(global-set-key [(control shift u)]
(lambda ()
(interactive)
(let ((read-quoted-char-radix 16))
(call-interactively 'quoted-insert))))