emacs-devel
[Top][All Lists]
Advanced

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

Re: Typing raw bytes


From: Kenichi Handa
Subject: Re: Typing raw bytes
Date: Mon, 21 Jan 2013 08:22:17 +0900

In article <address@hidden>, Eli Zaretskii <address@hidden> writes:

> Suppose I want to create a file whose contents is a series of certain
> bytes.  How would I go about that?

> I tried "M-x hexl-mode RET" in a new buffer, but it evidently doesn't
> let you insert bytes, only edit existing bytes.

> Next I tried "C-x RET f raw-text RET" in a new buffer followed by
> "C-q NNN" etc., but the data written thereafter to disk is more bytes
> than I typed, because, I guess, "C-q NNN" inserts windows-1255
> characters (this is on Windows, where keyboard-coding-system is
> windows-1255-unix), and what winds up in the file is their UTF-8
> encoding.

Please use C-q in a unibyte buffer.  For instance,

M-x find-file-literally RET _FILE_NAME_ RET
C-q 3 7 7 RET
C-x C-s

or

C-x b _NEW_BUFFER_NAME_ ERT
M-x toggle-enable-multibyte-characters RET
C-q 3 7 7 RET
C-x C-s

---
Kenichi Handa
address@hidden



reply via email to

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