I have a number of files on my Mac whose names suddenly started containing question marks.
When I examine them in Windows, they look fine. Same if I fire up the Ruby interactive shell (irb
) and examine them in UTF8 mode.
Any ideas on how to get rid of the question marks?
Update 1: here's a screen capture of Finder with some file names with question marks.
Update 2: An example of a bad file name is: Mac? ?users
.Output of locale
is:
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Examining the above file name in ruby interactive shell with filename.bytes{|c| puts c}
yields:
77
97
99
226
128
173
32
226
128
172
117
115
101
114
115
ls
, and what is the result of editing a file name, copying it, and pasting it into a text document? Then save, and view in a hex editor. What is the byte sequence where that character is?