Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unicode, Korean, normalization form, Mac OS X and tab completion



2014/06/02 04:53、Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> のメール:
> +	if (iconv(conv_ds,
> +		  &orig_name_ptr, &orig_name_len,
> +		  &conv_name_ptr, &conv_name_len) >= 0) {
> +	  if (orig_name_len == 0) {
> +	    /* Completely converted, metafy and return */
> +	    *conv_name_ptr = '\0';
> +	    return metafy(conv_name, -1, META_STATIC);
> +	  }
> +	}

Is it possible for iconv() to return >=0 while orig_name_len != 0 ?
man iconv(3) mentions four possible cases,
three of them are error (return value is -1),
and the remaining one is (returnvalue>=0 and orig_name_len==0).



Messages sorted by: Reverse Date, Date, Thread, Author