mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
* grub-core/normal/charset.c (grub_ucs4_to_utf8): Return number of
written bytes. (grub_get_num_of_utf8_bytes): New function. (grub_ucs4_to_utf8_alloc): Use grub_get_num_of_utf8_bytes. * grub-core/normal/menu_entry.c (run): Convert entry to UTF-8 before executing it. * include/grub/charset.h (grub_get_num_of_utf8_bytes): New proto. (grub_ucs4_to_utf8): Change return type.
This commit is contained in:
1 parent
491c57a815
commit
851ffadac2
4 files changed
+44
-13
No files matched your search
@@ -282,7 +282,14 @@ grub_ssize_t grub_utf8_to_ucs4_alloc (const char *msg,
|
||||
grub_uint32_t **unicode_msg,
|
||||
grub_uint32_t **last_position);
|
||||
|
||||
void
|
||||
/* Returns the number of bytes the string src would occupy is converted
|
||||
to UTF-8, excluding \0. */
|
||||
grub_size_t
|
||||
grub_get_num_of_utf8_bytes (const grub_uint32_t *src, grub_size_t size);
|
||||
|
||||
/* Converts UCS-4 to UTF-8. Returns the number of bytes effectively written
|
||||
excluding the trailing \0. */
|
||||
grub_size_t
|
||||
grub_ucs4_to_utf8 (const grub_uint32_t *src, grub_size_t size,
|
||||
grub_uint8_t *dest, grub_size_t destsize);
|
||||
grub_size_t grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
|
||||
|
||||
Reference in new issue
Block a user