dimanche 15 janvier 2023

How Do I Get A Random Character From The Entire UTF-8 Character Set [duplicate]

I am trying to make a program that gives a random character from the entire UTF-8 character set, but I can't get access to a variable that has every single character in the UTF-8, any chance you know where I could find at-least the fist 100K? (I realy hope my computer can store the file) NOTE: I am using Javascript.

I already know how to get a random word from a data set using this code:

var charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" // JUST AN EXAMPLE, I ACTUALLY NEED THE WHOLE UTF-8 IN HERE!
var randomletter = charset.split("")[Math.round(Math.random() * charset.split("").length)]

I just need to get the UTF-8 dataset in the charset variable




Aucun commentaire:

Enregistrer un commentaire