In admin panel [Manage] - [Import], importing WordPress eXtended RSS (WXR) incorrectly generate duplicated categories with same cat_name.
For example, this occurs under condition below.
At exporting:
| cat_ID | cat_name | category_nicename
|
| 3 | 書評 | book-review
|
(書評 means book review in Japanese.)
And after importing this WXR file, categories will look like below.
| cat_ID | cat_name | category_nicename
|
| 3 | 書評 | book-review
|
| 4 | 書評 | %e6%9b%b8%e8%a9%95
|
Two 書評 categories are generated. One has original "book-review" nicename and another has "%e6%9b%b8%e8%a9%95" which is sanitized string of "書評". And all posts in 書評 category belongs to 書評 category of "%e6%9b%b8%e8%a9%95".
It seems that this duplication occurs only when a category has category_nicename which is not equal to sanitized cat_name.
For easy reproducing of this behavior, I'll attach example WXR file. And I'll attach a patch for this.