help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making re-search-forward search for \377


From: Kevin Rodgers
Subject: Re: Making re-search-forward search for \377
Date: Sun, 02 Nov 2008 11:10:18 -0700
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Tyler Spivey wrote:
Xah <xahlee@gmail.com> writes:

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...

I'm probably going to end up working with binary data in a temp
buffer. Doing more research, I want enable-multibyte-characters to be
off. Given that, if we go to *scratch*
and run M-X toggle-enable-multibyte-characters until that variable
becomes nil, doing C-Q 377 RET gives 0xff, which is what I want
(according to C-x =, C-u C-x = and M-x describe-char). Now to
match it, I try:

(re-search-forward "\xff") - no luck

What did you use to figure out that the multibyte version of that
character was 0x00FF? I found it out accidentally as a lisp error, but
none of the previously described commands (C-X =, M-X describe-char or
C-u C-x =) will show that it is 0x00ff, they just show FF.

`C-u C-x =' shows this:

  character: ÿ (2303, #o4377, #x8ff, U+00FF)

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]