I am using:
random_bytes(30);
to generate a random string for my program. This string is then stored in a mysql database. However, when I run the function, I get an output such as
T�Ը�@(���m
which includes unreadable characters. When I then try to store it in my database, the � characters are not stored and so this means that the string is not properly preserved.
How can I make it so that it returns a string with only readable characters that will not be lost in my mysql database?
Thanks!