582
582
set_if_smaller(from_length, to_length);
583
res= to_cs->cset->well_formed_len(to_cs, from, from + from_length,
583
res= to_cs->cset->well_formed_len(*to_cs, str_ref(from, from_length), nchars, &well_formed_error);
586
585
*from_end_pos= from + res;
587
586
*well_formed_error_pos= well_formed_error ? from + res : NULL;