On Wed, Nov 15, 2000 at 01:48:06PM +0400, [EMAIL PROTECTED] wrote:
> 
>  May be glibc is buggy in MDK as usual?
> 
>  I think we can use the following workaround for this problem:
> instead of 
>       iconv(handle,NULL,NULL,NULL,NULL);
> everywhere use
>       iconv_reset(handle)
> where it's defined as follows:
> 
> void iconv_reset(iconv_t cd)
> {
>       if (XAP_EncodingManager::instance->cjk_locale())
>               iconv(cd,NULL,NULL,NULL,NULL);
> }
> 
>  since shift state (and its resetting) is meaningful only on multibyte locales
> such as CJK ones.
>

Yes, it is just a work around. 

But why iconv(cd,NULL,NULL,NULL,NULL) is called before the return state 
of the previous iconv is checked?

I was talking about the call in  try_UToC(). If 
iconv(cd,NULL,NULL,NULL,NULL) is needed, why 
not iconv(cd, NULL, NULL, &optr, &obuflen)? 
It seems iconv(cd,NULL,NULL,NULL,NULL) only reset
the state of 'cd' but that is useless if iconv
is only called once in try_UToC which transfer
ucs2 to other codeset. 

GB2312 don't use shift state, I don't really know this.





Reply via email to