def _decode_names(self):
if self.subject_name is not None:<EOL><INDENT>subject_name = []<EOL>for part in self.subject_name:<EOL><INDENT>new_part = []<EOL>for name, value in part:<EOL><INDENT>try:<EOL><INDENT>name = name.decode("<STR_LIT:utf-8>")<EOL>value = value.decode("<STR_LIT:utf-8>")<EOL><DEDENT>except UnicodeError:<EOL><INDENT>continue<EOL><DEDENT>new_part.append((name, value))<EOL><DEDENT>subject_name.append(tuple(new_part))<EOL><DEDENT>self.subject_name = tuple(subject_name)<EOL><DEDENT>for key, old in list(self.alt_names.items()):<EOL><INDENT>new = []<EOL>for name in old:<EOL><INDENT>try:<EOL><INDENT>name = name.decode("<STR_LIT:utf-8>")<EOL><DEDENT>except UnicodeError:<EOL><INDENT>continue<EOL><DEDENT>new.append(name)<EOL><DEDENT>self.alt_names[key] = new<EOL><DEDENT>
Decode names (hopefully ASCII or UTF-8) into Unicode.