Reading from dev/random
gives me many ?
s:
$ head -n 1 /dev/random
???i??0?4?=K?"?0??^Yx??????b"??k?]?JD?Xǀ?ʝֹ??6;?% ???SW#,?z??6?&?V?/7@??H??????Vg?G?Y*Դ?T???[ޘ?fj?|_r?4?-E??"?.?l^u,??'?N?Ƒ???\?v????7S?\ԔJRcɁ??k??Sn?Ԟ?
??^?????a?M{?????~??????+???????EC????J̡
This makes me think that the ?
s are characters that my terminal did not display correctly. I have my terminal set to display with UTF-8.
Is this an issue with encodings? Or is this expected since random numbers may not always encode valid characters?
My goal is to generate random sequences of Unicode characters easily on the command line. Specifically, each valid Unicode byte sequence should have some non-zero probability of appearing, and no invalid Unicode byte sequences should appear.