mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] nls: remove "support" for 5- and 6-byte UTF-8 sequences
Date: Tue, 29 Jul 2014 00:26:44 +0300	[thread overview]
Message-ID: <20140728212643.GA27113@p183.telecom.by> (raw)

5- and 6-byte UTF-8 sequences existed to accomodate code points starting
from U+200000.

Those code points couldn't fit into old 2-byte wchar_t type.

Commit 74675a58507e769beee7d949dbed788af3c4139d added 16+ bit Unicode support
but started (correctly) to check for maximum valid code point
which is U+10FFFF.

U+10FFFF decodes into just 4-byte sequence.

5- and 6- byte UTF-8 sequences were made illegal long ago in
Unicode standard and never had a chance to be used in Linux,
so put them out of misery.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 fs/nls/nls_base.c |    2 --
 1 file changed, 2 deletions(-)

--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -39,8 +39,6 @@ static const struct utf8_table utf8_table[] =
     {0xE0,  0xC0,   1*6,    0x7FF,          0x80,      /* 2 byte sequence */},
     {0xF0,  0xE0,   2*6,    0xFFFF,         0x800,     /* 3 byte sequence */},
     {0xF8,  0xF0,   3*6,    0x1FFFFF,       0x10000,   /* 4 byte sequence */},
-    {0xFC,  0xF8,   4*6,    0x3FFFFFF,      0x200000,  /* 5 byte sequence */},
-    {0xFE,  0xFC,   5*6,    0x7FFFFFFF,     0x4000000, /* 6 byte sequence */},
     {0,						       /* end of table    */}
 };
 

                 reply	other threads:[~2014-07-28 21:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140728212643.GA27113@p183.telecom.by \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®