[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#57297: localedef does not allow use of UTF8

Package: locales
Version: 2.1.2-13
Severity: normal
File: /usr/bin/localedef

When trying to make a locale file with UTF8, I got the error message:

value for <mb_cur_max> must lie between 1 and 4

However, the UTF8 file defines mb_cur_max as 6 (which is the right value for
it). Looking at the glibc upstream source code I found in
locale/programs/charmap.c:315 the following block:

if (arg->val.num < 1 || arg->val.num > 4)
    lr_error (cmfile,
    	      _("value for <%s> must lie between 1 and 4"),
	      nowtok == tok_mb_cur_min ? "mb_cur_min"
				       : "mb_cur_max");

    lr_ignore_rest (cmfile, 0);

Which means it is a hardcoded constant, which is ridiculous since the longest
multibyte character one would ever find is exactly from UTF-8, and is 6 bytes

This bug should be reported upstream, since it makes impossible the use of
UTF8 in all places where glibc is used.

-- System Information
Debian Release: 2.2
Architecture: i386
Kernel: Linux cesarb2 2.2.13 #1 Fri Dec 24 21:10:29 BRST 1999 i586

Reply to: