Incompatible with multibyte characters
I tried adding german umlauts (äüö) as valid lower case letters by setting the parameter PARAMETER_LOWER_CASE
$passwordGenerator->setParameter(ComputerPasswordGenerator::PARAMETER_LOWER_CASE, 'abcdefghijklmnopqrstuvwxyzöäüß')
Unfortunately this leads to generated passwords containing invalid utf8 characters. I believe the reason is that the library is using the "normal" string functions of PHP.
Is there any plan of upgrading to the multibyte string functions?
I'm amazed that this issue hasn't been reported before. I'll try and get this sorted in the next 24 hours
@floriankick I've added multibyte support into master. Can you confirm if that works for you?
Thanks for the quick reaction!
I tried the current master and generation seems to work fine for me.
Only in the validation I found one more spot to correct:
$count = strlen(preg_replace('|[^'.preg_quote($this->getParameter($option)).']|', '', $password));
I think mb_strlen and the u-Modifier for the regex pattern should help here.
@floriankick I've updated those instances, and found a few others as well.
Works like a charm! Thanks again! Would be happy to see those changes being released as a new version on packagist.
@floriankick I've tagged that as 1.7.0 I would have done it sooner, but I was away on holiday.