Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 12198)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1003,6 +1003,8 @@
 		// Back compat filters
 		if ( 'slug' == $field )
 			$value = apply_filters('pre_category_nicename', $value);
+		// DB validation
+		$value = wp_check_invalid_utf8($value, TRUE);
 
 	} else if ( 'rss' == $context ) {
 		$value = apply_filters("term_${field}_rss", $value, $taxonomy);
@@ -1358,9 +1360,6 @@
 	if ( is_int($term) && 0 == $term )
 		return new WP_Error('invalid_term_id', __('Invalid term ID'));
 
-	if ( '' == trim($term) )
-		return new WP_Error('empty_term_name', __('A name is required for this term'));
-
 	$defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
 	$args = wp_parse_args($args, $defaults);
 	$args['name'] = $term;
@@ -1368,6 +1367,9 @@
 	$args = sanitize_term($args, $taxonomy, 'db');
 	extract($args, EXTR_SKIP);
 
+	if ( '' == trim($name) )
+		return new WP_Error('empty_term_name', __('A name is required for this term'));
+
 	// expected_slashed ($name)
 	$name = stripslashes($name);
 	$description = stripslashes($description);
