all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-pretest-bug@gnu.org, miles@gnu.org
Subject: bug#481: Crashes with non-default language environments
Date: Wed, 25 Jun 2008 11:58:03 +0900	[thread overview]
Message-ID: <E1KBLCt-0007B8-RJ@etlken.m17n.org> (raw)
In-Reply-To: <jwvk5lab0qd.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 12 Feb 2008 11:29:55 -0500)

This is the thread of long ago.

In article <jwvk5lab0qd.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > But, even if we implement string-to-unibyte, it should be
> > used for a string containing only ascii and eight-bit chars.
> > And in that case, string-make-unibyte behaves exactly the
> > same as string-to-unibyte.

> No it would be different: it would also signal an error if some
> non-binary char is found.  (I might potentially be convinced that it's
> OK to additionally accept the 128-255 latin1 chars as alternatives to
> eight-bit chars, since they now get character codes 128-255).

I've just installed a change to implement string-to-unibyte
as below and used it to fix the problem of jpeg detection.

(string-to-unibyte string &optional accept-latin-1)

Return a unibyte string with the same individual chars as string.
If string is unibyte, the result is string itself.
Otherwise it is a newly created string, with no text properties,
where each `eight-bit' character is converted to the corresponding byte.
If string contains a non-ASCII, non-`eight-bit' character,
an error is signalled.
If the optional 2nd arg accept-latin-1 is non-nil, a Latin-1 character
doesn't cause an error, but is converted to a byte of same code.

---
Kenichi Handa
handa@ni.aist.go.jp






  reply	other threads:[~2008-06-25  2:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 19:54 Crashes with non-default language environments Juri Linkov
2008-02-09 22:17 ` Juri Linkov
2008-02-10  2:09   ` Stefan Monnier
2008-02-10 22:48     ` Juri Linkov
2008-02-11  1:39       ` Stefan Monnier
2008-02-11  1:56         ` Miles Bader
2008-02-11  3:02           ` Stefan Monnier
2008-02-11  4:11             ` Miles Bader
2008-02-11 14:06               ` Stefan Monnier
2008-02-11 15:16                 ` Miles Bader
2008-02-11 16:51                   ` Stefan Monnier
2008-02-11 21:27                 ` Juri Linkov
2008-02-12 11:41             ` Kenichi Handa
2008-02-12 16:29               ` Stefan Monnier
2008-06-25  2:58                 ` Kenichi Handa [this message]
2008-06-25  3:49                   ` bug#482: " Stefan Monnier
2008-07-02 10:44                     ` bug#517: " Kenichi Handa
2008-07-03 22:23                       ` bug#529: " Stefan Monnier
2008-07-04  2:27                         ` bug#531: " Kenichi Handa
2008-02-12 11:23       ` Kenichi Handa
2008-02-12 19:29         ` Juri Linkov

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

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

  git send-email \
    --in-reply-to=E1KBLCt-0007B8-RJ@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=481@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.