[Top][All Lists]

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

[bug-gnulib] Re: iconv made easy

From: Simon Josefsson
Subject: [bug-gnulib] Re: iconv made easy
Date: Tue, 14 Dec 2004 01:49:46 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Appended you find two alternative codes, taken from gettext (and tested for
> 4 years), and another one, taken from my unfinished libunistring - more
> powerful but untested.

The libunistring API is too complex for me.  The gettext
implementation calls iconv twice (I lean towards allocating a large
enough buffer instead), and it uses xstrdup.  However, my use only
ever call iconv on shortish strings (<<1kb) so my preference of
allocating a large enough buffer may be biased based on that.

So I would like to see the gettext API, modified to behave like my
original attempt, only that 5 is replaced by MB_LEN_MAX.  I think my
if-else algorithm is better if someone ever uses the gnulib
implementation on very large strings, but perhaps the complexity is
not worth it here.

Should I propose a patch, or do you want to merge it?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]