[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making re-search-forward search for \377
From: |
Xah |
Subject: |
Re: Making re-search-forward search for \377 |
Date: |
Sun, 2 Nov 2008 01:45:58 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Nov 2, 12:31 am, Tyler Spivey <tspi...@pcdesk.net> wrote:
> I'm having a hell of a time trying to get re-search-forward to find a
> \377 character in my buffer. Here is what I've tried so far, using
> *scratch*:
>
> 1. C-q 377 RET M-< RET
> (re-search-forward "\377") C-x C-e - not found.
> (re-search-forward "[press C-q 377]") C-x C-e - this works.
> If I turn multibyte off with M-X toggle-enable-multibyte-characters,
> none of these work. My eventual goal is to do this in an elisp program,
> but I need to get the basics
> reliably working first. I've tried string-{as,to,make}-multibyte on the
> "\377", with no luck. I've read the info pages on coding systems and
> such, but I'm not sure what I'm missing here.
what's the C-q 377 char?
if i press Ctrl+q 377 Enter, i get this char: ÿ, which is LATIN SMALL
LETTER Y WITH DIAERESIS (unicode U+00FF).
Then if i do:
(re-search-forward "ÿ")
ÿ
it works perfectly.
as far as my experience goes, the ease of programing with unicode in
elisp beats Perl and Python hands down...
Xah
∑ http://xahlee.org/
☄