mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
Add support for a "utf-8" mode
NOTE! MicroEmacs is very much a byte-based editor, and the new utf-8 support is purely an issue of terminal input and output. The file contents themselves are in the 8-bit space. In that space, Unicode is the same as Latin1. The new mode is called "utf-8", and is enabled automatically by the new emacs.rc when $LANG contains the substring "UTF-8". I'm sure people would like to some day also edit real UTF-8 contents, rather than just edit old 8-bit Latin1 contents in a UTF-8 terminal. However, that's an independent (and much bigger and thornier) issue. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -493,7 +493,7 @@ typedef struct BUFFER {
|
||||
#define BFTRUNC 0x04 /* buffer was truncated when read */
|
||||
|
||||
/* mode flags */
|
||||
#define NUMMODES 9 /* # of defined modes */
|
||||
#define NUMMODES 10 /* # of defined modes */
|
||||
|
||||
#define MDWRAP 0x0001 /* word wrap */
|
||||
#define MDCMOD 0x0002 /* C indentation and fence match */
|
||||
@@ -504,6 +504,7 @@ typedef struct BUFFER {
|
||||
#define MDMAGIC 0x0040 /* regular expresions in search */
|
||||
#define MDCRYPT 0x0080 /* encrytion mode active */
|
||||
#define MDASAVE 0x0100 /* auto-save mode */
|
||||
#define MDUTF8 0x0200 /* UTF-8 input/output mode */
|
||||
|
||||
/*
|
||||
* The starting position of a region, and the size of the region in
|
||||
|
||||
Reference in New Issue
Block a user