all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: schwab@linux-m68k.org, 4047@emacsbugs.donarmstrong.com,
	bogossian@mail.com
Subject: bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark
Date: Thu, 27 Aug 2009 20:15:49 +0900	[thread overview]
Message-ID: <tl7k50p7biy.fsf@m17n.org> (raw)
In-Reply-To: <83praof8mu.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Aug 2009 13:25:13 +0300)

In article <83praof8mu.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > At the moment, all I can say is that changing
> > coding.h:encode_coding_string is quite safe.  But,
> > encode_coding_object is used by Lisp functions
> > encode-coding-region and encode-coding-string, and thus the
> > change will break some packages that use them on unibyte
> > string/buffer.

> I fixed this in encode-coding-string.

I have overlooked this part:

Stefan wrote:
> I'd recommend we change encode_coding_string to be
> a nop on unibyte strings (tho, we may want to let it obey EOL
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> conversions).
  ^^^^^^^^^^^

We surely need eol conversion in sending a unibyte string to
a process.  So, I've just installed this change.

2009-08-27  Kenichi Handa  <handa@m17n.org>

	* process.c (send_process): Use encode_coding_object instead of
	encode_coding_string to perform eol-conversion even if the string
	is unibyte.

Index: process.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/process.c,v
retrieving revision 1.593
retrieving revision 1.594
diff -u -r1.593 -r1.594
--- process.c	17 Aug 2009 21:04:07 -0000	1.593
+++ process.c	27 Aug 2009 11:12:54 -0000	1.594
@@ -5721,7 +5721,8 @@
 	}
       else if (STRINGP (object))
 	{
-	  encode_coding_string (coding, object, 1);
+	  encode_coding_object (coding, object, 0, 0, SCHARS (object),
+				SBYTES (object), Qt);
 	}
       else
 	{

---
Kenichi Handa
handa@m17n.org





      parent reply	other threads:[~2009-08-27 11:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07  8:50 bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark Pierre Bogossian
2009-08-08 12:20 ` Eli Zaretskii
2009-08-08 13:22   ` Eli Zaretskii
2009-08-08 14:29     ` Andreas Schwab
2009-08-08 15:29       ` Eli Zaretskii
2009-08-08 15:47         ` Andreas Schwab
2009-08-08 17:24           ` Eli Zaretskii
2009-08-08 17:57             ` Lennart Borgman
2009-08-08 15:56         ` Lennart Borgman
2009-08-08 17:25           ` Eli Zaretskii
2009-08-10 19:45       ` Stefan Monnier
2009-08-11  0:51         ` Kenichi Handa
2009-08-14  9:02           ` Eli Zaretskii
2009-08-21  9:33             ` Eli Zaretskii
2009-08-21 12:18               ` Kenichi Handa
     [not found]                 ` <83praof8mu.fsf@gnu.org>
2009-08-05 14:01                   ` Pierre Bogossian
2009-08-06 17:49                     ` Eli Zaretskii
2009-08-22 10:30                     ` bug#4047: marked as done (23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark) Emacs bug Tracking System
2009-08-27 11:15                   ` Kenichi Handa [this message]

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=tl7k50p7biy.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=4047@emacsbugs.donarmstrong.com \
    --cc=bogossian@mail.com \
    --cc=eliz@gnu.org \
    --cc=schwab@linux-m68k.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.
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.