unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Display corruption with binary files
@ 2006-11-23 22:05 August Karlstrom
  2006-11-24 11:49 ` Robert Thorpe
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: August Karlstrom @ 2006-11-23 22:05 UTC (permalink / raw)


Hi,

When I open any binary file with Emacs in console mode (emacs -nw) the 
display gets corrupted (the menu and parts of the mode line disappears). 
In GUI mode it works as expected. I use GNU Emacs version 21.4.1 and 
gnome-terminal 2.16.1 under Ubuntu 6.10.

Any clues?


Regards,

August

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-23 22:05 Display corruption with binary files August Karlstrom
@ 2006-11-24 11:49 ` Robert Thorpe
  2006-11-25 10:30   ` August Karlstrom
  2006-11-24 18:37 ` Eli Zaretskii
       [not found] ` <mailman.1054.1164416983.2155.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 19+ messages in thread
From: Robert Thorpe @ 2006-11-24 11:49 UTC (permalink / raw)


August Karlstrom wrote:
> Hi,
>
> When I open any binary file with Emacs in console mode (emacs -nw) the
> display gets corrupted (the menu and parts of the mode line disappears).
> In GUI mode it works as expected. I use GNU Emacs version 21.4.1 and
> gnome-terminal 2.16.1 under Ubuntu 6.10.
>
> Any clues?

Bits of the binary file being interpreted at terminal control
characters is a likely culprit.
If that is the problem then Emacs should not send such characters to
the terminal.  It may be a terminal problem though.  I'd report it as
an Emacs bug with that caveat.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-23 22:05 Display corruption with binary files August Karlstrom
  2006-11-24 11:49 ` Robert Thorpe
@ 2006-11-24 18:37 ` Eli Zaretskii
       [not found] ` <mailman.1054.1164416983.2155.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-24 18:37 UTC (permalink / raw)


> From: August Karlstrom <fusionfive@comhem.se>
> Date: Thu, 23 Nov 2006 22:05:45 GMT
> 
> When I open any binary file with Emacs in console mode (emacs -nw) the 
> display gets corrupted (the menu and parts of the mode line disappears). 
> In GUI mode it works as expected. I use GNU Emacs version 21.4.1 and 
> gnome-terminal 2.16.1 under Ubuntu 6.10.
> 
> Any clues?

Try "M-x hexl-find-file RET", it is meant for editing binary files.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-24 11:49 ` Robert Thorpe
@ 2006-11-25 10:30   ` August Karlstrom
  2006-11-25 11:04     ` Eli Zaretskii
                       ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: August Karlstrom @ 2006-11-25 10:30 UTC (permalink / raw)


Robert Thorpe skrev:
> August Karlstrom wrote:
>> Hi,
>>
>> When I open any binary file with Emacs in console mode (emacs -nw) the
>> display gets corrupted (the menu and parts of the mode line disappears).
>> In GUI mode it works as expected. I use GNU Emacs version 21.4.1 and
>> gnome-terminal 2.16.1 under Ubuntu 6.10.
>>
>> Any clues?
> 
> Bits of the binary file being interpreted at terminal control
> characters is a likely culprit.

OK, but isn't a binary file as well as a text file really just a 
sequence of arbitrary bytes?

> If that is the problem then Emacs should not send such characters to
> the terminal.  It may be a terminal problem though.  I'd report it as
> an Emacs bug with that caveat.

Eli Zaretskii's answer seems to indicate that this is a known problem.


Thanks,

August

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
       [not found] ` <mailman.1054.1164416983.2155.help-gnu-emacs@gnu.org>
@ 2006-11-25 10:30   ` August Karlstrom
  2006-11-25 10:42     ` August Karlstrom
  0 siblings, 1 reply; 19+ messages in thread
From: August Karlstrom @ 2006-11-25 10:30 UTC (permalink / raw)


Eli Zaretskii skrev:
>> From: August Karlstrom <fusionfive@comhem.se>
>> Date: Thu, 23 Nov 2006 22:05:45 GMT
>>
>> When I open any binary file with Emacs in console mode (emacs -nw) the 
>> display gets corrupted (the menu and parts of the mode line disappears). 
>> In GUI mode it works as expected. I use GNU Emacs version 21.4.1 and 
>> gnome-terminal 2.16.1 under Ubuntu 6.10.
>>
>> Any clues?
> 
> Try "M-x hexl-find-file RET", it is meant for editing binary files.

Works like a charm.


Thanks,

August

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 10:30   ` August Karlstrom
@ 2006-11-25 10:42     ` August Karlstrom
  2006-11-25 13:15       ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: August Karlstrom @ 2006-11-25 10:42 UTC (permalink / raw)


August Karlstrom skrev:
> Eli Zaretskii skrev:
>>> From: August Karlstrom <fusionfive@comhem.se>
>>> Date: Thu, 23 Nov 2006 22:05:45 GMT
>>>
>>> When I open any binary file with Emacs in console mode (emacs -nw) 
>>> the display gets corrupted (the menu and parts of the mode line 
>>> disappears). In GUI mode it works as expected. I use GNU Emacs 
>>> version 21.4.1 and gnome-terminal 2.16.1 under Ubuntu 6.10.
>>>
>>> Any clues?
>>
>> Try "M-x hexl-find-file RET", it is meant for editing binary files.
> 
> Works like a charm.

One thing I've noticed with `hexl-find-file' though is that read-only 
permission of a file is not respected (I'm able to edit a read-only 
binary file). This is not the case if I open the file in Emacs with GUI 
(and run `hexl-mode'). Is this a bug?


August

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 10:30   ` August Karlstrom
@ 2006-11-25 11:04     ` Eli Zaretskii
  2006-11-25 16:38       ` Perry Smith
       [not found]       ` <mailman.1101.1164472694.2155.help-gnu-emacs@gnu.org>
  2006-11-25 12:42     ` Peter Dyballa
                       ` (2 subsequent siblings)
  3 siblings, 2 replies; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-25 11:04 UTC (permalink / raw)


> From: August Karlstrom <fusionfive@comhem.se>
> Date: Sat, 25 Nov 2006 10:30:16 GMT
> > 
> > Bits of the binary file being interpreted at terminal control
> > characters is a likely culprit.
> 
> OK, but isn't a binary file as well as a text file really just a 
> sequence of arbitrary bytes?
> 
> > If that is the problem then Emacs should not send such characters to
> > the terminal.  It may be a terminal problem though.  I'd report it as
> > an Emacs bug with that caveat.
> 
> Eli Zaretskii's answer seems to indicate that this is a known problem.

Yes, it's a known problem that the Unix terminal interprets certain
sequences of characters as commands.  I'm not sure Emacs can do
anything to solve this, but suggestions are welcome.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 10:30   ` August Karlstrom
  2006-11-25 11:04     ` Eli Zaretskii
@ 2006-11-25 12:42     ` Peter Dyballa
       [not found]     ` <mailman.1089.1164458537.2155.help-gnu-emacs@gnu.org>
       [not found]     ` <mailman.1086.1164452697.2155.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 19+ messages in thread
From: Peter Dyballa @ 2006-11-25 12:42 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 25.11.2006 um 10:30 schrieb August Karlstrom:

> OK, but isn't a binary file as well as a text file really just a  
> sequence of arbitrary bytes?

A text file, binary or multinary, does not contain control  
characters. Control characters are for example ASCII NUL ...  
INFORMATION SEPARATOR ONE (U+0000...U+001F) and DELETE ...  
APPLICATION PROGRAM COMMAND (U+007F...U+009F), plus some more, that  
for example determine whether a text goes right-to-left or left-to- 
right, or up-down or ...

--
Greetings

   Pete

Time is an illusion. Lunchtime, doubly so.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 10:42     ` August Karlstrom
@ 2006-11-25 13:15       ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-25 13:15 UTC (permalink / raw)


> From: August Karlstrom <fusionfive@comhem.se>
> Date: Sat, 25 Nov 2006 10:42:39 GMT
> 
> One thing I've noticed with `hexl-find-file' though is that read-only 
> permission of a file is not respected (I'm able to edit a read-only 
> binary file). This is not the case if I open the file in Emacs with GUI 
> (and run `hexl-mode'). Is this a bug?

Yes, probably.  Please report this to the bug-reporting address.

Thanks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
       [not found]     ` <mailman.1089.1164458537.2155.help-gnu-emacs@gnu.org>
@ 2006-11-25 13:16       ` August Karlstrom
  0 siblings, 0 replies; 19+ messages in thread
From: August Karlstrom @ 2006-11-25 13:16 UTC (permalink / raw)


Peter Dyballa skrev:
> 
> Am 25.11.2006 um 10:30 schrieb August Karlstrom:
> 
>> OK, but isn't a binary file as well as a text file really just a 
>> sequence of arbitrary bytes?
> 
> A text file, binary or multinary, does not contain control characters. 
> Control characters are for example ASCII NUL ... INFORMATION SEPARATOR 
> ONE (U+0000...U+001F) and DELETE ... APPLICATION PROGRAM COMMAND 
> (U+007F...U+009F), plus some more, that for example determine whether a 
> text goes right-to-left or left-to-right, or up-down or ...

OK, thanks for the info.


August

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 11:04     ` Eli Zaretskii
@ 2006-11-25 16:38       ` Perry Smith
  2006-11-25 21:02         ` Eli Zaretskii
       [not found]       ` <mailman.1101.1164472694.2155.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 19+ messages in thread
From: Perry Smith @ 2006-11-25 16:38 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1503 bytes --]


On Nov 25, 2006, at 5:04 AM, Eli Zaretskii wrote:

>> From: August Karlstrom <fusionfive@comhem.se>
>> Date: Sat, 25 Nov 2006 10:30:16 GMT
>>>
>>> Bits of the binary file being interpreted at terminal control
>>> characters is a likely culprit.
>>
>> OK, but isn't a binary file as well as a text file really just a
>> sequence of arbitrary bytes?
>>
>>> If that is the problem then Emacs should not send such characters to
>>> the terminal.  It may be a terminal problem though.  I'd report  
>>> it as
>>> an Emacs bug with that caveat.
>>
>> Eli Zaretskii's answer seems to indicate that this is a known  
>> problem.
>
> Yes, it's a known problem that the Unix terminal interprets certain
> sequences of characters as commands.  I'm not sure Emacs can do
> anything to solve this, but suggestions are welcome.

I have not been closely watching this but I'm confused.

emacs of old (I thought) would 'quote' the characters.  So, if the  
file had a control-C, emacs would display ^C and a single forward- 
character while the cursor is sitting on the ^ would move two screeen  
spaces up to the next character.  So, while emacs would send escape  
sequences itself to control the terminal, the data of the file would  
be sent properly.  (I'm not sure I'm saying clearly what I mean.)

Is this not done?  Didn't emacs use to do it?

Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



[-- Attachment #1.2: Type: text/html, Size: 7417 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 16:38       ` Perry Smith
@ 2006-11-25 21:02         ` Eli Zaretskii
  2006-11-26  0:34           ` Perry Smith
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-25 21:02 UTC (permalink / raw)


> Cc: help-gnu-emacs@gnu.org
> From: Perry Smith <pedz@easesoftware.com>
> Date: Sat, 25 Nov 2006 10:38:04 -0600
> 
> emacs of old (I thought) would 'quote' the characters.  So, if the  
> file had a control-C, emacs would display ^C and a single forward- 
> character while the cursor is sitting on the ^ would move two screeen  
> spaces up to the next character.

I don't think Emacs ever did that.

> Is this not done?  Didn't emacs use to do it?

Only if you use hexl, which is why I recommended it to the OP.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-25 21:02         ` Eli Zaretskii
@ 2006-11-26  0:34           ` Perry Smith
  2006-11-26  4:09             ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Perry Smith @ 2006-11-26  0:34 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1548 bytes --]

On Nov 25, 2006, at 3:02 PM, Eli Zaretskii wrote:

>> Cc: help-gnu-emacs@gnu.org
>> From: Perry Smith <pedz@easesoftware.com>
>> Date: Sat, 25 Nov 2006 10:38:04 -0600
>>
>> emacs of old (I thought) would 'quote' the characters.  So, if the
>> file had a control-C, emacs would display ^C and a single forward-
>> character while the cursor is sitting on the ^ would move two screeen
>> spaces up to the next character.
>
> I don't think Emacs ever did that.
>
>> Is this not done?  Didn't emacs use to do it?
>
> Only if you use hexl, which is why I recommended it to the OP.

We must be talking about two different things or something.

On my Mac system, there is a version of emacs 21.2.1 in /usr/bin/ 
emacs.  I have a bzip tar file.  I type:

emacs foo.tar.bz2

from a Mac "terminal" window (not an X11 window) and it comes up just  
fine: inside the terminal.  I can move around just like I remember.

The teminal is pretending to be an xterm.  In fact, you can do the  
same thing inside an xterm, just unset DISPLAY -- otherwise emacs  
will become an X11 client.

I tried doing the same thing to the GUI style emacs 22.0.50 version  
but if I do it from the terminal, it complains that it can't find  
things: encoded-kb... I probably need to set my load-path on the  
command line somehow.

Anyhow... I know it worked as of emacs 21.  I can't test it on emacs  
22 today.

Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



[-- Attachment #1.2: Type: text/html, Size: 7419 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-26  0:34           ` Perry Smith
@ 2006-11-26  4:09             ` Eli Zaretskii
  2006-11-26  4:55               ` Perry Smith
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-26  4:09 UTC (permalink / raw)


> Cc: help-gnu-emacs@gnu.org
> From: Perry Smith <pedz@easesoftware.com>
> Date: Sat, 25 Nov 2006 18:34:04 -0600
> 
> On my Mac system, there is a version of emacs 21.2.1 in /usr/bin/ 
> emacs.  I have a bzip tar file.  I type:
> 
> emacs foo.tar.bz2
> 
> from a Mac "terminal" window (not an X11 window) and it comes up just  
> fine: inside the terminal.  I can move around just like I remember.

Maybe whoever built that version of Emacs for the Mac did something
special to it.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-26  4:09             ` Eli Zaretskii
@ 2006-11-26  4:55               ` Perry Smith
  2006-11-26  9:19                 ` Arjen Wiersma
  2006-11-26 20:23                 ` Eli Zaretskii
  0 siblings, 2 replies; 19+ messages in thread
From: Perry Smith @ 2006-11-26  4:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

On Nov 25, 2006, at 10:09 PM, Eli Zaretskii wrote:

>> Cc: help-gnu-emacs@gnu.org
>> From: Perry Smith <pedz@easesoftware.com>
>> Date: Sat, 25 Nov 2006 18:34:04 -0600
>>
>> On my Mac system, there is a version of emacs 21.2.1 in /usr/bin/
>> emacs.  I have a bzip tar file.  I type:
>>
>> emacs foo.tar.bz2
>>
>> from a Mac "terminal" window (not an X11 window) and it comes up just
>> fine: inside the terminal.  I can move around just like I remember.
>
> Maybe whoever built that version of Emacs for the Mac did something
> special to it.

I get the same results with the emacs on the RS/6000 that I built  
personally.  I simple did configure and make.  That emacs is 21.4.1.


Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-26  4:55               ` Perry Smith
@ 2006-11-26  9:19                 ` Arjen Wiersma
  2006-11-26 20:23                 ` Eli Zaretskii
  1 sibling, 0 replies; 19+ messages in thread
From: Arjen Wiersma @ 2006-11-26  9:19 UTC (permalink / raw)
  Cc: help-gnu-emacs

Hi,

>>> Cc: help-gnu-emacs@gnu.org
>>> From: Perry Smith <pedz@easesoftware.com>
>>> Date: Sat, 25 Nov 2006 18:34:04 -0600
>>>
>>> On my Mac system, there is a version of emacs 21.2.1 in /usr/bin/
>>> emacs.  I have a bzip tar file.  I type:
>>>
>>> emacs foo.tar.bz2
>>>
>>> from a Mac "terminal" window (not an X11 window) and it comes up  
>>> just
>>> fine: inside the terminal.  I can move around just like I remember.
>>
>> Maybe whoever built that version of Emacs for the Mac did something
>> special to it.
>
> I get the same results with the emacs on the RS/6000 that I built  
> personally.  I simple did configure and make.  That emacs is 21.4.1.

I tried both Emacs 21.2.1 and 22.0.90.1 (2006-11-12) and they both  
escape the characters to they ^-ed versions

To illustrate, first line from /bin/ls.

\376\355\372\316^@^@^@^R^@^@^@^@^@^@^@^B^@^@^@^K^@^@^FH^@^@^@ 
\205^@^@^@^A^@^@^@8__PAGEZERO^@^@^@^@^@^@^@^@^@^@^@^@^P^@^@^@^@^@^@^@ 
\^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^D^@^@^@^A^@^@^BX__TEXT^@^@^@^@^@^@^@ 
^@^@^@^@^@^P^@^@^@`^@^@^@^@^@^@^@`^@^@^@^@^G^@^@^@^E^@^@^@^ 
\H^@^@^@^@__text^@^@^@^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@^@^@^Z 
\304^@^@F\350^@^@

It does this both in terminal and gui (started with -q)

Regards,

Arjen

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
       [not found]       ` <mailman.1101.1164472694.2155.help-gnu-emacs@gnu.org>
@ 2006-11-26 13:30         ` Robert Thorpe
  0 siblings, 0 replies; 19+ messages in thread
From: Robert Thorpe @ 2006-11-26 13:30 UTC (permalink / raw)


Perry Smith wrote:
> On Nov 25, 2006, at 5:04 AM, Eli Zaretskii wrote:
>
> >> From: August Karlstrom <fusionfive@comhem.se>
> >> Date: Sat, 25 Nov 2006 10:30:16 GMT
> >>>
> >>> Bits of the binary file being interpreted at terminal control
> >>> characters is a likely culprit.
> >>
> >> OK, but isn't a binary file as well as a text file really just a
> >> sequence of arbitrary bytes?
> >>
> >>> If that is the problem then Emacs should not send such characters to
> >>> the terminal.  It may be a terminal problem though.  I'd report
> >>> it as
> >>> an Emacs bug with that caveat.
> >>
> >> Eli Zaretskii's answer seems to indicate that this is a known
> >> problem.
> >
> > Yes, it's a known problem that the Unix terminal interprets certain
> > sequences of characters as commands.  I'm not sure Emacs can do
> > anything to solve this, but suggestions are welcome.
>
> I have not been closely watching this but I'm confused.
>
> emacs of old (I thought) would 'quote' the characters.  So, if the
> file had a control-C, emacs would display ^C and a single forward-
> character while the cursor is sitting on the ^ would move two screeen
> spaces up to the next character.  So, while emacs would send escape
> sequences itself to control the terminal, the data of the file would
> be sent properly.  (I'm not sure I'm saying clearly what I mean.)
>
> Is this not done?  Didn't emacs use to do it?

It may have been a terminal setup that did this.  I think I've seen
this behaviour in the past before too.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
  2006-11-26  4:55               ` Perry Smith
  2006-11-26  9:19                 ` Arjen Wiersma
@ 2006-11-26 20:23                 ` Eli Zaretskii
  1 sibling, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2006-11-26 20:23 UTC (permalink / raw)


> Cc: help-gnu-emacs@gnu.org
> From: Perry Smith <pedz@easesoftware.com>
> Date: Sat, 25 Nov 2006 22:55:45 -0600
> 
> On Nov 25, 2006, at 10:09 PM, Eli Zaretskii wrote:
> 
> >> Cc: help-gnu-emacs@gnu.org
> >> From: Perry Smith <pedz@easesoftware.com>
> >> Date: Sat, 25 Nov 2006 18:34:04 -0600
> >>
> >> On my Mac system, there is a version of emacs 21.2.1 in /usr/bin/
> >> emacs.  I have a bzip tar file.  I type:
> >>
> >> emacs foo.tar.bz2
> >>
> >> from a Mac "terminal" window (not an X11 window) and it comes up just
> >> fine: inside the terminal.  I can move around just like I remember.
> >
> > Maybe whoever built that version of Emacs for the Mac did something
> > special to it.
> 
> I get the same results with the emacs on the RS/6000 that I built  
> personally.  I simple did configure and make.  That emacs is 21.4.1.

Okay, I see that I've misunderstood the point and responded in a way
that could cause a terrible confusion.  Let me try to clarify.

Yes, Emacs does display control characters as ^c or \XXX.  However, it
does so only for certain characters (mainly, 8-bit characters and
low-end 7-bit characters).  It is quite possible that an arbitrary
binary garbage could be interpreted by Emacs as non-ASCII characters
and cause some terminal control sequence be written to the display.
Also, I think control characters that come from a display table (for
those who know what that is) are output verbatim.

So, to summarize, Emacs mostly does TRT with unprintable characters,
but not always, and visiting a binary file in the default multibyte
mode could plausibly cause related problems.

Sorry for any confusion I could have caused with my earlier messages
in this thread.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Display corruption with binary files
       [not found]     ` <mailman.1086.1164452697.2155.help-gnu-emacs@gnu.org>
@ 2006-11-27 20:50       ` Stefan Monnier
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Monnier @ 2006-11-27 20:50 UTC (permalink / raw)


> Yes, it's a known problem that the Unix terminal interprets certain
> sequences of characters as commands.  I'm not sure Emacs can do
> anything to solve this, but suggestions are welcome.

IIRC the problem was reported and fixed in Emacs-CVS a few months ago
(eight-bit-* chars were sent as raw uninterpreted bytes to the terminal
without going through coding-system: this was OK for eight bit encodings,
but not with utf-8).


        Stefan

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-11-27 20:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-23 22:05 Display corruption with binary files August Karlstrom
2006-11-24 11:49 ` Robert Thorpe
2006-11-25 10:30   ` August Karlstrom
2006-11-25 11:04     ` Eli Zaretskii
2006-11-25 16:38       ` Perry Smith
2006-11-25 21:02         ` Eli Zaretskii
2006-11-26  0:34           ` Perry Smith
2006-11-26  4:09             ` Eli Zaretskii
2006-11-26  4:55               ` Perry Smith
2006-11-26  9:19                 ` Arjen Wiersma
2006-11-26 20:23                 ` Eli Zaretskii
     [not found]       ` <mailman.1101.1164472694.2155.help-gnu-emacs@gnu.org>
2006-11-26 13:30         ` Robert Thorpe
2006-11-25 12:42     ` Peter Dyballa
     [not found]     ` <mailman.1089.1164458537.2155.help-gnu-emacs@gnu.org>
2006-11-25 13:16       ` August Karlstrom
     [not found]     ` <mailman.1086.1164452697.2155.help-gnu-emacs@gnu.org>
2006-11-27 20:50       ` Stefan Monnier
2006-11-24 18:37 ` Eli Zaretskii
     [not found] ` <mailman.1054.1164416983.2155.help-gnu-emacs@gnu.org>
2006-11-25 10:30   ` August Karlstrom
2006-11-25 10:42     ` August Karlstrom
2006-11-25 13:15       ` Eli Zaretskii

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