summaryrefslogtreecommitdiff
path: root/devdocs/elisp/disabling-multibyte.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/disabling-multibyte.html
new repository
Diffstat (limited to 'devdocs/elisp/disabling-multibyte.html')
-rw-r--r--devdocs/elisp/disabling-multibyte.html6
1 files changed, 6 insertions, 0 deletions
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 @@
+ <h3 class="section">Disabling Multibyte Characters</h3> <p>By default, Emacs starts in multibyte mode: it stores the contents of buffers and strings using an internal encoding that represents non-<acronym>ASCII</acronym> characters using multi-byte sequences. Multibyte mode allows you to use all the supported languages and scripts without limitations. </p> <p>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 <em>unibyte mode</em>. 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 <acronym>ASCII</acronym> characters, and 128 (0200 octal) through 255 (0377 octal) represent non-<acronym>ASCII</acronym> characters. </p> <p>To edit a particular file in unibyte representation, visit it using <code>find-file-literally</code>. See <a href="visiting-functions">Visiting Functions</a>. You can convert a multibyte buffer to unibyte by saving it to a file, killing the buffer, and visiting the file again with <code>find-file-literally</code>. Alternatively, you can use <kbd>C-x <span class="key">RET</span> c</kbd> (<code>universal-coding-system-argument</code>) and specify ‘<samp>raw-text</samp>’ as the coding system with which to visit or save a file. See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Text-Coding.html#Text-Coding">Specifying a Coding System for File Text</a> in <cite>GNU Emacs Manual</cite>. Unlike <code>find-file-literally</code>, finding a file as ‘<samp>raw-text</samp>’ doesn’t disable format conversion, uncompression, or auto mode selection. </p> <p>The buffer-local variable <code>enable-multibyte-characters</code> is non-<code>nil</code> in multibyte buffers, and <code>nil</code> 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. </p> <p>You can turn off multibyte support in a specific buffer by invoking the command <code>toggle-enable-multibyte-characters</code> in that buffer. </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Disabling-Multibyte.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Disabling-Multibyte.html</a>
+ </p>
+</div>