U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mike FABIAN <maiku.fabian@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 11/15] efi_loader: capitalization table
Date: Mon, 27 Aug 2018 10:30:28 +0200	[thread overview]
Message-ID: <m3lg8s2ouz.fsf@gmail.com> (raw)
In-Reply-To: <14d178bd-56e2-0bf4-d738-f91c00783b78@suse.de> (Alexander Graf's message of "Mon, 27 Aug 2018 00:06:40 +0200")

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 2917 bytes --]

Alexander Graf <agraf@suse.de> さんは書きました:

> On 26.08.18 21:00, Heinrich Schuchardt wrote:
>> On 08/26/2018 08:22 PM, Alexander Graf wrote:
>>>
>>>
>>> On 11.08.18 17:28, Heinrich Schuchardt wrote:
>>>> This patch provides a define to initialize a table that maps lower to
>>>> capital letters for Unicode code point 0x0000 - 0xffff.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>>> ---
>>>>  MAINTAINERS              |    1 +
>>>>  include/capitalization.h | 1909 ++++++++++++++++++++++++++++++++++++++
>>>>  2 files changed, 1910 insertions(+)
>>>>  create mode 100644 include/capitalization.h
>>>>
>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>> index a324139471..0a543309f2 100644
>>>> --- a/MAINTAINERS
>>>> +++ b/MAINTAINERS
>>>> @@ -368,6 +368,7 @@ F:	doc/DocBook/efi.tmpl
>>>>  F:	doc/README.uefi
>>>>  F:	doc/README.iscsi
>>>>  F:	Documentation/efi.rst
>>>> +F:	include/capitalization.h
>>>>  F:	include/efi*
>>>>  F:	include/pe.h
>>>>  F:	include/asm-generic/pe.h
>>>> diff --git a/include/capitalization.h b/include/capitalization.h
>>>> new file mode 100644
>>>> index 0000000000..50d5108f98
>>>> --- /dev/null
>>>> +++ b/include/capitalization.h
>>>> @@ -0,0 +1,1909 @@
>>>> +/* SPDX-License-Identifier: Unicode-DFS-2016 */
>>>> +/*
>>>> + * Correspondence table for small and capital Unicode letters in the range of
>>>> + * 0x0000 - 0xffff based on http://www.unicode.org/Public/UCA/11.0.0/allkeys.txt
>>>> + */
>>>> +
>>>> +struct capitalization_table {
>>>> +	u16 upper;
>>>> +	u16 lower;
>>>> +};
>>>> +
>>>> +#define UNICODE_CAPITALIZATION_TABLE { \
>>>
>>> Ugh, that is a *lot* of data. How much does the binary size grow with
>>> the table compiled in?

That data is also in glibc. I don’t know whether you use glibc though
...

>>> Is there any slightly more sophisticated pattern in the table maybe that
>>> we could just express as code? Would that turn out smaller maybe?
>> 
>> This is 3792 bytes of data. Unicode capitalization is quite random in
>> arranging lower and upper letters.
>> 
>> We could resort to zlib or gzip. But these libraries are not built by
>> default.
>
> Yeah, and that only adds to more overhead.
>
>> Most urgently we will need the capitalization table for generating and
>> checking short FAT filenames, so we could create a configuration switch
>> that would reduce this table to codepage 437 or codepage 1250 letters
>> depending on the chosen native character set.
>
> I think that's a great idea. There probably is a lot of overlap even
> between the two, so maybe just make it a config option for "non-latin
> upper/lower case conversion".
>
>> In EDK2 I only found code for codepage 1250.
>
> Yeah, I'd be surprised if people really needed more. In fact, how about
> you just default the config option to =n by default?
>
>
> Alex
>

-- 
📧 Mike FABIAN   <mike.fabian@gmx.de>
睡眠不足はいい仕事の敵だ。

  reply	other threads:[~2018-08-27  8:30 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-11 15:28 [U-Boot] [PATCH 00/15] efi_loader: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 01/15] lib: build charset.o only if needed Heinrich Schuchardt
2018-08-26 17:45   ` Alexander Graf
2018-08-26 18:06     ` Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 02/15] efi_loader: rename utf16_strlen, utf16_strnlen Heinrich Schuchardt
2018-08-26 17:52   ` Alexander Graf
2018-08-26 18:21     ` Heinrich Schuchardt
2018-08-26 18:33       ` Alexander Graf
2018-08-26 19:36         ` Heinrich Schuchardt
2018-08-26 21:57           ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 03/15] lib: charset: utility functions for Unicode Heinrich Schuchardt
2018-08-26 17:59   ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 04/15] test: unit tests for Unicode functions Heinrich Schuchardt
2018-08-26 18:02   ` Alexander Graf
2018-08-26 18:27     ` Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 05/15] lib: vsprintf: correct printing of Unicode strings Heinrich Schuchardt
2018-08-26 18:05   ` Alexander Graf
2018-08-26 18:34     ` Heinrich Schuchardt
2018-08-26 22:01       ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 06/15] test: test printing Unicode Heinrich Schuchardt
2018-08-26 18:06   ` Alexander Graf
2018-08-26 18:36     ` Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 07/15] efi_loader: remove limit on variable length Heinrich Schuchardt
2018-08-26 18:13   ` Alexander Graf
2018-08-26 18:40     ` Heinrich Schuchardt
2018-08-26 22:04       ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 08/15] efi_loader: don't use unlimited stack as buffer Heinrich Schuchardt
2018-08-26 18:16   ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 09/15] efi_loader: buffer size for load options Heinrich Schuchardt
2018-08-26 18:17   ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 10/15] lib: charset: remove obsolete functions Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 11/15] efi_loader: capitalization table Heinrich Schuchardt
2018-08-26 18:22   ` Alexander Graf
2018-08-26 19:00     ` Heinrich Schuchardt
2018-08-26 22:06       ` Alexander Graf
2018-08-27  8:30         ` Mike FABIAN [this message]
2018-08-27  8:37           ` Alexander Graf
2018-08-30  2:51             ` Simon Glass
2018-08-30  6:41               ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 12/15] lib: charset: upper/lower case conversion Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 13/15] test: tests for utf_to_lower() utf_to_upper() Heinrich Schuchardt
2018-08-11 15:28 ` [U-Boot] [PATCH 14/15] efi_loader: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt
2018-08-26 18:31   ` Alexander Graf
2018-08-11 15:28 ` [U-Boot] [PATCH 15/15] efi_selftest: EFI_UNICODE_COLLATION_PROTOCOL Heinrich Schuchardt

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=m3lg8s2ouz.fsf@gmail.com \
    --to=maiku.fabian@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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