Gregwar / Captcha

PHP Captcha library
MIT License
1.73k stars 290 forks source link

multi-byte safe phrase rendering #47

Closed nvbooster closed 7 years ago

nvbooster commented 7 years ago

Fixed iterating multibyte non-latin (cyrillic and so on) symbols

nvbooster commented 7 years ago

though included fonts does not support cyrillic symbols, even providing own ttf fonts does not make possible to render cyrrillic captcha with current implementation

Gregwar commented 7 years ago

Hello I guess that would imply adding a dependency with mbstring in the composer.json right?

nvbooster commented 7 years ago

Sure. Added to composer. I'm convinced that mbstring extension is musthave tool when working with strings in utf8 when you intent to work with characters other than base latin characters. Also, now this is not checked in any way, which leads to unexpected results without warning.

seems like i messed up this PR, recreated here #49