1

Here are some raw bytes shown in emacs that are printing correctly:

enter image description here

I can see that those are the actual bytes with od -bc on the command line:

enter image description here

When I use control-space to mark, control-w to cut, and control-y to yank, it drops something different:

enter image description here

od -bc confirms it is different:

enter image description here

How do I faithfully cut and paste the first thing, which has the raw bytes I want?

I'm using Emacs 22.1.1 on OS X.

(This is a place name, Łódź.)

EDIT: I did not find how to edit raw bytes in general. However, for my bytes, it was sufficient to edit the file in the "cp1250" encoding. I did this with:

C-x C-m c cp1250-unix RET C-x C-f <filename>

described here. (The "unix" part means to leave line endings alone.)

1 Answer 1

1

You can use M-x find-file-literally to:

Visit file FILENAME with no conversion of any kind. Format conversion and character code conversion are both disabled, and multibyte characters are disabled in the resulting buffer.

For more details (including information about "format conversion" and "character code conversion"), see the description of this command in C-hig (elisp)Visiting Functions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.