unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Making re-search-forward search for \377
Date: Sun, 2 Nov 2008 01:45:58 -0700 (PDT)	[thread overview]
Message-ID: <c6f94cfe-dae3-4983-b3e9-e5e4a281d3f1@g17g2000prg.googlegroups.com> (raw)
In-Reply-To: 87tzaqporw.fsf@pcdesk.net

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/

  reply	other threads:[~2008-11-02  8:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02  7:31 Making re-search-forward search for \377 Tyler Spivey
2008-11-02  8:45 ` Xah [this message]
2008-11-02  9:12   ` Tyler Spivey
2008-11-02 18:10     ` Kevin Rodgers
2008-11-02 20:32     ` Xah
2008-11-02 22:35       ` Tyler Spivey
2008-11-03  4:21     ` Eli Zaretskii
     [not found]     ` <mailman.2743.1225686066.25473.help-gnu-emacs@gnu.org>
2008-11-03  4:54       ` Tyler Spivey
2008-11-03 19:42         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6f94cfe-dae3-4983-b3e9-e5e4a281d3f1@g17g2000prg.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).