diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 2e16c35..d390385 100644
a
|
b
|
class SelectMultiple(Select):
|
527 | 527 | data = [] |
528 | 528 | if len(initial) != len(data): |
529 | 529 | return True |
530 | | for value1, value2 in zip(initial, data): |
531 | | if force_unicode(value1) != force_unicode(value2): |
532 | | return True |
533 | | return False |
| 530 | initial_set = set([force_unicode(value) for value in initial]) |
| 531 | data_set = set([force_unicode(value) for value in data]) |
| 532 | if len(data_set - initial_set) == 0: |
| 533 | return False |
| 534 | else: |
| 535 | return True |
534 | 536 | |
535 | 537 | class RadioInput(StrAndUnicode): |
536 | 538 | """ |
diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py
index b8ec789..3fdfbb8 100644
a
|
b
|
False
|
673 | 673 | True |
674 | 674 | >>> w._has_changed([1, 2], [u'1', u'3']) |
675 | 675 | True |
| 676 | >>> w._has_changed([2, 1], [u'1', u'2']) |
| 677 | False |
676 | 678 | |
677 | 679 | # Choices can be nested one level in order to create HTML optgroups: |
678 | 680 | >>> w.choices = (('outer1', 'Outer 1'), ('Group "1"', (('inner1', 'Inner 1'), ('inner2', 'Inner 2')))) |