FriCAS currently passes names without any change to Lisp. I am
not sure if there are some special cases, but normal names are
passed without change to the operating system.
It is not clear what you want to do. Normal case is that we use
names choosen by the user. It is user resonsibilty to choose
legal name and ensure that OS behaviour will not cause unexpected
name clashes.
If you want to store arbitrary data in file names then reasonably
safe way is to use base 36 encoding, that is convert to integer
first and print integer in base 36. We have support for printing in
different bases, convertion to integers would be for you to provide.
--
Waldek Hebisch