fix(genpass): only use words with ASCII characters in `genpass-xkcd` (#9508)
Diff
1diff --git a/plugins/genpass/genpass.plugin.zsh b/plugins/genpass/genpass.plugin.zsh
2index 15bfebda8f078e0801ee26ab82fadcdecace4355..65bbd2e488fbeb5c794a4ae70db41b7e128db25f 100644
3--- a/plugins/genpass/genpass.plugin.zsh
4+++ b/plugins/genpass/genpass.plugin.zsh
5@@ -80,7 +80,7 @@ genpass-xkcd() {
6 [[ $1 =~ '^[0-9]+$' ]] && num=$1 || num=1
7 8 # Get all alphabetic words of at most 6 characters in length
9- local dict=$(grep -E '^[a-zA-Z]{,6}$' /usr/share/dict/words)
10+ local dict=$(LC_ALL=C grep -E '^[a-zA-Z]{,6}$' /usr/share/dict/words)
1112 # Calculate the base-2 entropy of each word in $dict
13 # Entropy is e = L * log2(C), where L is the length of the password (here,