use set magic in reduce (e.g. utf8) Fixes RT#121992

analysis and fix by davem and tonyc
Merge branch 'reduce-smg' of git://github.com/rurban/Scalar-List-Utils into rurban-reduce-smg
Merge branch 'rurban-reduce-smg'