Skip to content

Fix password length for utf-8 encoded chars (http://zargony.com/2009/07/...#13

Open
haploke wants to merge 3 commits intomixtli:masterfrom
haploke:master
Open

Fix password length for utf-8 encoded chars (http://zargony.com/2009/07/...#13
haploke wants to merge 3 commits intomixtli:masterfrom
haploke:master

Conversation

@haploke
Copy link

@haploke haploke commented Dec 1, 2014

http://zargony.com/2009/07/24/ruby-1-9-and-file-encodings

UTF-8 chars (like é, è, ç) are encoded by a double byte in stead of a normal sized 1 byte char. So, it is better to use the bytesize of the password string in stead of the length of the string, otherwise the password strings loose some bytes at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant