if (string_length > full_length) string_length = full_length;
while ( string_length > full_length ) {  while ( string_length > 0 && ((inString[string_length-1]&(char)0xc0) == (char)0x80)) {  string_length--; }  if ( string_length ) {  string_length--; } }
pk11_setStringName(const char *inString, char *buffer, int buffer_length) {    int full_length, string_length;    full_length = buffer_length -1;    string_length = PORT_Strlen(inString);    if (string_length > full_length) string_length = full_length;    PORT_Memset(buffer,' ',full_length);    buffer[full_length] = 0;    PORT_Memcpy(buffer,inString,string_length);    return buffer;}