wow!

nice find Simon.

Thnx!

On 2021-08-15 16:27, Simon Josefsson wrote:
Daniel Forsberg <daniel.forsberg@dsv.su.se> writes:

Hello fellow Grepers!

the following line:

echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd -r -p |
base32 | grep -E "[0-9A-Z]+" -o

produces the following output

LCBSPBBX6BY6
VZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA
This is because W is not part of the Swedish collate class, so A-Z does
not match W, for some strange reason -- I think this has been changed in
recent glibc though.

jas@latte:~$ LANG=sv_SE.UTF-8
jas@latte:~$ echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd -r -p | base32 | grep -E "[0-9A-Z]+" -o
LCBSPBBX6BY6
VZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA
jas@latte:~$ LANG=C
jas@latte:~$ echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd -r -p | base32 | grep -E "[0-9A-Z]+" -o
LCBSPBBX6BY6WVZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA
jas@latte:~$ 

/Simon
--
____________________________________
Daniel Forsberg
Developer at eGovlab

Department of Computer and Systems Sciences
Stockholm University
Postbox 7003, SE-164 07 Kista
Visiting address: Borgarfjordsgatan 12, Kista
https://egovlab.eu/
https://dsv.su.se
____________________________________