if(scanlen == 0) scanlen = 1;
PUBLIC uint32    INTL_TextToUnicode(    INTL_Encoding_ID encoding,    unsigned char*   src,    uint32			 srclen,    INTL_Unicode*    ustr,    uint32           ubuflen){	/* 	 * Use the Netscape conversion tables	 */	uint32	validlen,scanlen;	uint16 num, med;	uTableSet tableset;  XP_ASSERT( (CS_UNKNOWN != encoding) && (CS_DEFAULT != encoding));	num = LoadUCS2TableSet(encoding, &tableset,FALSE);	for(validlen=0;	((srclen > 0) && ((*src) != '\0') && (ubuflen > 1));		srclen -= scanlen, src += scanlen, ustr++, ubuflen--,validlen++)	{		uint16 i;		if(*src < 0x20)		{			*ustr = (INTL_Unicode)(*src);			scanlen = 1;			continue;		}		for(i=0;i<num;i++)		{			if((tableset.tables[i] != NULL) &&			   (tableset.range[i].min <= src[0]) &&				   (src[0] <= tableset.range[i].max) &&				   (uScan(tableset.shift[i],(int32*) 0,src,&med,srclen,&scanlen)))			{				uMapCode(tableset.tables[i],med, ustr);				if(*ustr != NOMAPPING)					break;			}		}		if(i==num)		{#ifdef STRICTUNICODETEST			XP_ASSERT(i!=num);#endif			*ustr= NOMAPPING;		}	}	*ustr = (INTL_Unicode) 0;	/* Unload all the table we need */	UnloadUCS2TableSet(&tableset,FALSE);	return validlen;}