[PATCH] tty/vt: UTF-8 parsing update according to RFC 3629, modern Unicode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vc_translate_unicode(), vc_sanitize_unicode():
1. Limit codepoint space to 0x10FFFF. The old algorithm followed an ancient
   version of Unicode.
2. Corrected vc_translate_unicode() doc (@rescan).
3. "Noncharacters", such as U+FFFE, U+FFFF, are no longer invalid in Unicode -
   - accept them. Another option was to complete the set of noncharacters (used
   to be those two, now there's more) and preserve the substitution. This is
   indeed what Unicode suggests (v15.1, chap. 23.7) (not requires), but most
   codepoints are !iswprint(), so substituting just the noncharacters seemed
   futile. Also, I've never seen noncharacters treated in a special way.
4. Moved what remained of vc_sanitize_unicode() into vc_translate_unicode().

Signed-off-by: Roman Žilka <roman.zilka@xxxxxxxxx>
---
 drivers/tty/vt/vt.c | 36 +++++++-----------------------------
 1 file changed, 7 insertions(+), 29 deletions(-)

base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9
-- 
2.41.0

Attachment: 0001-tty-vt-UTF-8-parsing-update-according-to-RFC-3629-mo.patch.xz
Description: application/xz


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux