This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4406] New: iconv_open does not allow colon in charset name


iconv_open fails for any charset that have a colon in its name. However a few 
aliases in iconvdata/gconv-modules have a colon in their name, and are returned 
by iconv --list

The patch below fixes the problem by allowing colons in charset names.

--- iconv/gconv_charset.h       2005-12-21 08:27:27.000000000 +0100
+++ iconv/gconv_charset.h       2007-04-22 00:57:25.000000000 +0200
@@ -30,7 +30,7 @@
   while (*s != '\0')
     {
       if (__isalnum_l (*s, _nl_C_locobj_ptr)
-         || *s == '_' || *s == '-' || *s == '.' || *s == ',')
+         || *s == '_' || *s == '-' || *s == '.' || *s == ',' || *s == ':')
        *wp++ = __toupper_l (*s, _nl_C_locobj_ptr);
       else if (*s == '/')
        {
--- iconv/iconv_open.c  2001-11-29 05:57:52.000000000 +0100
+++ iconv/iconv_open.c  2007-04-22 00:59:08.000000000 +0200
@@ -38,7 +38,7 @@
   int res;

   /* Normalize the name.  We remove all characters beside alpha-numeric,
-     '_', '-', '/', and '.'.  */
+     '_', '-', '/', '.' and ':'.  */
   tocode_len = strlen (tocode);
   tocode_conv = (char *) alloca (tocode_len + 3);
   strip (tocode_conv, tocode);

-- 
           Summary: iconv_open does not allow colon in charset name
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4406

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]