In Finder I get the error 'The name you entered can't be used'
While trying to rename a PDF file I kept getting the above message. The text I was trying to use had no UTF characters, or odd glyphs. It did have a comma and a hyphen. I had copied the text into Clipboard and was trying to use that.
After several failed attempts I pasted my text into a text editor. Lo and behold I discovered the problem. The text included newline characters (hard returns).
After deleting them to get a single line of text, I was able to rename my file.
iMac 24″, macOS 14.6