From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/disabling-multibyte.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devdocs/elisp/disabling-multibyte.html (limited to 'devdocs/elisp/disabling-multibyte.html') diff --git a/devdocs/elisp/disabling-multibyte.html b/devdocs/elisp/disabling-multibyte.html new file mode 100644 index 00000000..1f1a17c7 --- /dev/null +++ b/devdocs/elisp/disabling-multibyte.html @@ -0,0 +1,6 @@ +

Disabling Multibyte Characters

By default, Emacs starts in multibyte mode: it stores the contents of buffers and strings using an internal encoding that represents non-ASCII characters using multi-byte sequences. Multibyte mode allows you to use all the supported languages and scripts without limitations.

Under very special circumstances, you may want to disable multibyte character support, for a specific buffer. When multibyte characters are disabled in a buffer, we call that unibyte mode. In unibyte mode, each character in the buffer has a character code ranging from 0 through 255 (0377 octal); 0 through 127 (0177 octal) represent ASCII characters, and 128 (0200 octal) through 255 (0377 octal) represent non-ASCII characters.

To edit a particular file in unibyte representation, visit it using find-file-literally. See Visiting Functions. You can convert a multibyte buffer to unibyte by saving it to a file, killing the buffer, and visiting the file again with find-file-literally. Alternatively, you can use C-x RET c (universal-coding-system-argument) and specify ‘raw-text’ as the coding system with which to visit or save a file. See Specifying a Coding System for File Text in GNU Emacs Manual. Unlike find-file-literally, finding a file as ‘raw-text’ doesn’t disable format conversion, uncompression, or auto mode selection.

The buffer-local variable enable-multibyte-characters is non-nil in multibyte buffers, and nil in unibyte ones. The mode line also indicates whether a buffer is multibyte or not. With a graphical display, in a multibyte buffer, the portion of the mode line that indicates the character set has a tooltip that (amongst other things) says that the buffer is multibyte. In a unibyte buffer, the character set indicator is absent. Thus, in a unibyte buffer (when using a graphical display) there is normally nothing before the indication of the visited file’s end-of-line convention (colon, backslash, etc.), unless you are using an input method.

You can turn off multibyte support in a specific buffer by invoking the command toggle-enable-multibyte-characters in that buffer.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Disabling-Multibyte.html +

+
-- cgit v1.2.3