fixes infinite loop when duplicate item encountered
more edge cases
couple more international characters
Merge pull request #1 from insidewarehouse/master

Fix infinite loop when duplicate item encountered