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/4936] New: iconv(cd, 0, 0, 0, 0); doesn't behave like documented (glibc 2.5 and 2.6.1 atleast)


According to the documentation, iconv(cd) with both inputbuffer and outputbuffer
set to NULL should reset the state of `cd`. However, this does not work for
"unicode" atleast.

A unicode stream starts with a BOM character, and after a iconv(cd, 0, 0, 0, 0),
I just get an error if I feed it with a new BOM character.

cd=iconv_open("utf-8", "unicode");
iconv(cd, unicode_string_with_bom, &srclen, &target, &targetlen); /* ok */
iconv(cd, 0, 0, 0, 0); /* this should reset the state of cd */
iconv(cd, unicode_string_with_bom, &srclen, &target, &targetlen); /* this now fails*

-- 
           Summary: iconv(cd, 0, 0, 0, 0); doesn't behave like documented
                    (glibc 2.5 and 2.6.1 atleast)
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: stian at nixia dot no
                CC: glibc-bugs at sources dot redhat dot com


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

------- 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]