diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-24 19:44:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-24 19:44:21 -0700 |
commit | 8899ed4e1f076d6f3c400731992210513bb629d3 (patch) | |
tree | 2a317b54d2e9ff3f2b41b847689bd96fb303ffa5 | |
parent | dbf1a014a7b038f59fbb1bea6f93b105f25ad3a0 (diff) | |
download | uemacs-8899ed4e1f076d6f3c400731992210513bb629d3.tar.gz |
Fix the unicode character limit (0 .. 0x10ffff)
For some reason I had limited things to 0xffff, it really should be 0x10ffff.
We don't actually support a full 32-bit unicode model anyway, since we
use the high bits for the control/meta/^X/special bits, but there was no
reason to limit things to 16 bits when we had 28 bits available. And
the real limit for real Unicode characters is 0x10ffff.
Add a silly example character past the 16-bit range to the UTF8 demo
file:
'SMILING FACE WITH HALO' (U+1F607)
from the 'emoticons' block.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | UTF-8-demo.txt | 2 | ||||
-rw-r--r-- | main.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/UTF-8-demo.txt b/UTF-8-demo.txt index 4363f27..61b50e0 100644 --- a/UTF-8-demo.txt +++ b/UTF-8-demo.txt @@ -210,3 +210,5 @@ Box drawing alignment tests: █ ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ ▗▄▖▛▀▜ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ ▝▀▘▙▄▟ + +😇 @@ -500,7 +500,7 @@ int execute(int c, int f, int n) || (c >= 0x80 && c <= 0xFE)) { #else #if VMS || BSD || USG /* 8BIT P.K. */ - || (c >= 0xA0 && c <= 0xFFFF)) { + || (c >= 0xA0 && c <= 0x10FFFF)) { #else ) { #endif |