Ziwei
Ziwei

Reputation: 57

Why there is "??" before a filename

I have a code that generates several output files. I saw that there are two question marks in my filename. For example, I am supposed to get a file named "output.txt", but actually I got "??output.txt". What does it mean?

Upvotes: 0

Views: 37

Answers (1)

rmunn
rmunn

Reputation: 36708

The question marks are probably invalid Unicode characters. To find out precisely which characters, you could try ls *output.txt | xxd. That will tell you the UTF-8 bytes that make up the character(s). Then go to http://www.ltg.ed.ac.uk/~richard/utf-8.html and paste in the hex values that xxd reported, making sure that you select "Hex UTF-8 bytes". You should see the Unicode codepoint of the invalid character(s) in the filename you're producing.

Upvotes: 1

Related Questions