From f3cb4a4e5721f3860085cd5f6f6d2b292d02958e Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 25 Dec 2011 16:07:33 +0100 Subject: [PATCH] * grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix. (grub_bidi_line_logical_to_visual): Skip tags. They are deprecated. * include/grub/unicode.h (GRUB_UNICODE_TAG_START): New enum value. (GRUB_UNICODE_TAG_END): Likewise. (GRUB_UNICODE_LAST_VALID): Likewise. --- ChangeLog | 8 ++++++++ grub-core/normal/charset.c | 7 +++++-- include/grub/unicode.h | 5 ++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e15c6d824..4559ffe49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-25 Vladimir Serbinenko + + * grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix. + (grub_bidi_line_logical_to_visual): Skip tags. They are deprecated. + * include/grub/unicode.h (GRUB_UNICODE_TAG_START): New enum value. + (GRUB_UNICODE_TAG_END): Likewise. + (GRUB_UNICODE_LAST_VALID): Likewise. + 2011-12-25 Vladimir Serbinenko * include/grub/unicode.h (grub_unicode_compact_range): Replace end with diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c index 314a1be66..4d6cbfac0 100644 --- a/grub-core/normal/charset.c +++ b/grub-core/normal/charset.c @@ -213,8 +213,7 @@ grub_ucs4_to_utf8 (const grub_uint32_t *src, grub_size_t size, { grub_uint32_t code = *src++; grub_ssize_t s; - s = grub_encode_utf8_character (dest, destend, - code); + s = grub_encode_utf8_character (dest, destend, code); if (s == -2) break; if (s == -1) @@ -906,6 +905,10 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t *logical, continue; } + /* The tags: deprecated, never used. */ + if (*lptr >= GRUB_UNICODE_TAG_START && *lptr <= GRUB_UNICODE_TAG_END) + continue; + p = grub_unicode_aglomerate_comb (lptr, logical + logical_len - lptr, &visual[visual_len]); diff --git a/include/grub/unicode.h b/include/grub/unicode.h index ebdfbddbf..24240a019 100644 --- a/include/grub/unicode.h +++ b/include/grub/unicode.h @@ -206,8 +206,11 @@ enum GRUB_UNICODE_BLACK_LEFT_TRIANGLE = 0x25c4, GRUB_UNICODE_VARIATION_SELECTOR_1 = 0xfe00, GRUB_UNICODE_VARIATION_SELECTOR_16 = 0xfe0f, + GRUB_UNICODE_TAG_START = 0xe0000, + GRUB_UNICODE_TAG_END = 0xe007f, GRUB_UNICODE_VARIATION_SELECTOR_17 = 0xe0100, - GRUB_UNICODE_VARIATION_SELECTOR_256 = 0xe01ef + GRUB_UNICODE_VARIATION_SELECTOR_256 = 0xe01ef, + GRUB_UNICODE_LAST_VALID = 0x10ffff }; extern struct grub_unicode_compact_range grub_unicode_compact[];