Use mb_substr instead of substr for safety
Merge pull request #68 from ingro/master

Use mb_substr instead of substr for safety