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/12234] iconvlist API


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

--- Comment #3 from Ulrich Drepper <drepper.fsp at gmail dot com> 2010-11-19 21:50:06 UTC ---
You shouldn't offer this.  Having a name on the list doesn't guarantee that a
conversion between any two of the listed encodings is possible.  The only way
to find out whether it is possible is by calling iconv_open.

Even if you overlook this flaw in your use, such an interface doesn't belong
into libc.  Except for your use there is no known user.

The only possibility I'd except is to make the iconv program a PIE.  Then you
could dlopen() the file and call a special function.  That function could
return in some way or form the list of encodings.  This wouldn't require any
code duplication.  But is it really worth the time?  The forking really
shouldn't be that expensive.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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