Hi Vlad,

On Mon, 9 Apr 2001, Vlad Harchev wrote:

>  The code is necessary - the iconv from libiconv dies in SIGSEGV sometimes if
> all arguments beside it are not NULL (that's a valid usage for iconv). We have
> no option beside this ugly hack or fixing iconv from libiconv by ourselves.

> > -    if (XAP_EncodingManager::instance->cjk_locale())
> > -   iconv(cd,const_cast<ICONV_CONST char**>((char**)NULL),NULL,NULL,NULL);
> > +   iconv(cd,const_cast<ICONV_CONST char**>((char**)NULL),NULL,NULL,NULL);

So you're saying that iconv dies sometimes if all arguments are not
NULL?  In this case, all of the arguments are NULL, and this seems to be
permitted by the manpage:

       A third case is when inbuf is NULL or *inbuf is NULL,  and
       outbuf is NULL or *outbuf is NULL. In this case, the iconv
       function sets cd's conversion state to the initial  state.

Why is it suddenly OK to execute this code if cjk_locale() is set?

pat



Reply via email to