From 5f94ca33cf7772e0c36b5b3e5b1cf1ab01f60180 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 7 May 2010 14:12:26 +0200 Subject: cfdisk: support non-ascii characters in input On Sat, Apr 03, 2010 at 12:58:48PM +0000, Jorge wrote: > When you want to write changes to disk you're asked for a > confirmation, like this one: > > Are you sure you want to write the partition table to disk? (yes > or no) > > There is no problem on the English version, but when you launch the > program in Spanish you get this: > > ¿Está seguro de que desea escribir la tabla de particiones en el > disco? > (sí o no): > > You can't type the "í" character. Trying to do so will end in no > input at all. That is, typing in my keyboard "´" then "i" leads to > nothing. So you can't write changes to disk, and you must launch the > program in English for it to operate. Reported-by: Jorge Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/205327 Signed-off-by: Karel Zak --- include/mbsalign.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/mbsalign.h') diff --git a/include/mbsalign.h b/include/mbsalign.h index b8a588c20..fd957b398 100644 --- a/include/mbsalign.h +++ b/include/mbsalign.h @@ -38,6 +38,8 @@ enum { #endif }; -size_t -mbsalign (const char *src, char *dest, size_t dest_size, - size_t *width, mbs_align_t align, int flags); +extern size_t mbs_truncate(char *str, size_t *width); + +extern size_t mbsalign (const char *src, char *dest, + size_t dest_size, size_t *width, + mbs_align_t align, int flags); -- cgit v1.2.3-55-g7522