Only a few characters in the Windows code page 1252 (Latin-1) are not allowed as names. Note that the Windows Explorer will strip leading spaces from names and not allow you to call a files space dot something (like ?.txt
), although this is allowed in the file system! Only a space and no file extension is invalid however.
If you create files through e.g. a Python script (this is what I did), then you can easily find out what is actually allowed and in what order the characters get sorted. The sort order varies based on your locale! Below are the results of my script, run with Python 2.7.15 on a German Windows 10 Pro 64bit:
Allowed:
32 20 SPACE
! 33 21 EXCLAMATION MARK
# 35 23 NUMBER SIGN
$ 36 24 DOLLAR SIGN
% 37 25 PERCENT SIGN
& 38 26 AMPERSAND
' 39 27 APOSTROPHE
( 40 28 LEFT PARENTHESIS
) 41 29 RIGHT PARENTHESIS
+ 43 2B PLUS SIGN
, 44 2C COMMA
- 45 2D HYPHEN-MINUS
. 46 2E FULL STOP
/ 47 2F SOLIDUS
0 48 30 DIGIT ZERO
1 49 31 DIGIT ONE
2 50 32 DIGIT TWO
3 51 33 DIGIT THREE
4 52 34 DIGIT FOUR
5 53 35 DIGIT FIVE
6 54 36 DIGIT SIX
7 55 37 DIGIT SEVEN
8 56 38 DIGIT EIGHT
9 57 39 DIGIT NINE
; 59 3B SEMICOLON
= 61 3D EQUALS SIGN
@ 64 40 COMMERCIAL AT
A 65 41 LATIN CAPITAL LETTER A
B 66 42 LATIN CAPITAL LETTER B
C 67 43 LATIN CAPITAL LETTER C
D 68 44 LATIN CAPITAL LETTER D
E 69 45 LATIN CAPITAL LETTER E
F 70 46 LATIN CAPITAL LETTER F
G 71 47 LATIN CAPITAL LETTER G
H 72 48 LATIN CAPITAL LETTER H
I 73 49 LATIN CAPITAL LETTER I
J 74 4A LATIN CAPITAL LETTER J
K 75 4B LATIN CAPITAL LETTER K
L 76 4C LATIN CAPITAL LETTER L
M 77 4D LATIN CAPITAL LETTER M
N 78 4E LATIN CAPITAL LETTER N
O 79 4F LATIN CAPITAL LETTER O
P 80 50 LATIN CAPITAL LETTER P
Q 81 51 LATIN CAPITAL LETTER Q
R 82 52 LATIN CAPITAL LETTER R
S 83 53 LATIN CAPITAL LETTER S
T 84 54 LATIN CAPITAL LETTER T
U 85 55 LATIN CAPITAL LETTER U
V 86 56 LATIN CAPITAL LETTER V
W 87 57 LATIN CAPITAL LETTER W
X 88 58 LATIN CAPITAL LETTER X
Y 89 59 LATIN CAPITAL LETTER Y
Z 90 5A LATIN CAPITAL LETTER Z
[ 91 5B LEFT SQUARE BRACKET
\\ 92 5C REVERSE SOLIDUS
] 93 5D RIGHT SQUARE BRACKET
^ 94 5E CIRCUMFLEX ACCENT
_ 95 5F LOW LINE
` 96 60 GRAVE ACCENT
a 97 61 LATIN SMALL LETTER A
b 98 62 LATIN SMALL LETTER B
c 99 63 LATIN SMALL LETTER C
d 100 64 LATIN SMALL LETTER D
e 101 65 LATIN SMALL LETTER E
f 102 66 LATIN SMALL LETTER F
g 103 67 LATIN SMALL LETTER G
h 104 68 LATIN SMALL LETTER H
i 105 69 LATIN SMALL LETTER I
j 106 6A LATIN SMALL LETTER J
k 107 6B LATIN SMALL LETTER K
l 108 6C LATIN SMALL LETTER L
m 109 6D LATIN SMALL LETTER M
n 110 6E LATIN SMALL LETTER N
o 111 6F LATIN SMALL LETTER O
p 112 70 LATIN SMALL LETTER P
q 113 71 LATIN SMALL LETTER Q
r 114 72 LATIN SMALL LETTER R
s 115 73 LATIN SMALL LETTER S
t 116 74 LATIN SMALL LETTER T
u 117 75 LATIN SMALL LETTER U
v 118 76 LATIN SMALL LETTER V
w 119 77 LATIN SMALL LETTER W
x 120 78 LATIN SMALL LETTER X
y 121 79 LATIN SMALL LETTER Y
z 122 7A LATIN SMALL LETTER Z
{ 123 7B LEFT CURLY BRACKET
} 125 7D RIGHT CURLY BRACKET
~ 126 7E TILDE
\x7f 127 7F DELETE
\x80 128 80 EURO SIGN
\x81 129 81
\x82 130 82 SINGLE LOW-9 QUOTATION MARK
\x83 131 83 LATIN SMALL LETTER F WITH HOOK
\x84 132 84 DOUBLE LOW-9 QUOTATION MARK
\x85 133 85 HORIZONTAL ELLIPSIS
\x86 134 86 DAGGER
\x87 135 87 DOUBLE DAGGER
\x88 136 88 MODIFIER LETTER CIRCUMFLEX ACCENT
\x89 137 89 PER MILLE SIGN
\x8a 138 8A LATIN CAPITAL LETTER S WITH CARON
\x8b 139 8B SINGLE LEFT-POINTING ANGLE QUOTATION
\x8c 140 8C LATIN CAPITAL LIGATURE OE
\x8d 141 8D
\x8e 142 8E LATIN CAPITAL LETTER Z WITH CARON
\x8f 143 8F
\x90 144 90
\x91 145 91 LEFT SINGLE QUOTATION MARK
\x92 146 92 RIGHT SINGLE QUOTATION MARK
\x93 147 93 LEFT DOUBLE QUOTATION MARK
\x94 148 94 RIGHT DOUBLE QUOTATION MARK
\x95 149 95 BULLET
\x96 150 96 EN DASH
\x97 151 97 EM DASH
\x98 152 98 SMALL TILDE
\x99 153 99 TRADE MARK SIGN
\x9a 154 9A LATIN SMALL LETTER S WITH CARON
\x9b 155 9B SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
\x9c 156 9C LATIN SMALL LIGATURE OE
\x9d 157 9D
\x9e 158 9E LATIN SMALL LETTER Z WITH CARON
\x9f 159 9F LATIN CAPITAL LETTER Y WITH DIAERESIS
\xa0 160 A0 NON-BREAKING SPACE
\xa1 161 A1 INVERTED EXCLAMATION MARK
\xa2 162 A2 CENT SIGN
\xa3 163 A3 POUND SIGN
\xa4 164 A4 CURRENCY SIGN
\xa5 165 A5 YEN SIGN
\xa6 166 A6 PIPE, BROKEN VERTICAL BAR
\xa7 167 A7 SECTION SIGN
\xa8 168 A8 SPACING DIAERESIS - UMLAUT
\xa9 169 A9 COPYRIGHT SIGN
\xaa 170 AA FEMININE ORDINAL INDICATOR
\xab 171 AB LEFT DOUBLE ANGLE QUOTES
\xac 172 AC NOT SIGN
\xad 173 AD SOFT HYPHEN
\xae 174 AE REGISTERED TRADE MARK SIGN
\xaf 175 AF SPACING MACRON - OVERLINE
\xb0 176 B0 DEGREE SIGN
\xb1 177 B1 PLUS-OR-MINUS SIGN
\xb2 178 B2 SUPERSCRIPT TWO - SQUARED
\xb3 179 B3 SUPERSCRIPT THREE - CUBED
\xb4 180 B4 ACUTE ACCENT - SPACING ACUTE
\xb5 181 B5 MICRO SIGN
\xb6 182 B6 PILCROW SIGN - PARAGRAPH SIGN
\xb7 183 B7 MIDDLE DOT - GEORGIAN COMMA
\xb8 184 B8 SPACING CEDILLA
\xb9 185 B9 SUPERSCRIPT ONE
\xba 186 BA MASCULINE ORDINAL INDICATOR
\xbb 187 BB RIGHT DOUBLE ANGLE QUOTES
\xbc 188 BC FRACTION ONE QUARTER
\xbd 189 BD FRACTION ONE HALF
\xbe 190 BE FRACTION THREE QUARTERS
\xbf 191 BF INVERTED QUESTION MARK
\xc0 192 C0 LATIN CAPITAL LETTER A WITH GRAVE
\xc1 193 C1 LATIN CAPITAL LETTER A WITH ACUTE
\xc2 194 C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
\xc3 195 C3 LATIN CAPITAL LETTER A WITH TILDE
\xc4 196 C4 LATIN CAPITAL LETTER A WITH DIAERESIS
\xc5 197 C5 LATIN CAPITAL LETTER A WITH RING ABOVE
\xc6 198 C6 LATIN CAPITAL LETTER AE
\xc7 199 C7 LATIN CAPITAL LETTER C WITH CEDILLA
\xc8 200 C8 LATIN CAPITAL LETTER E WITH GRAVE
\xc9 201 C9 LATIN CAPITAL LETTER E WITH ACUTE
\xca 202 CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX
\xcb 203 CB LATIN CAPITAL LETTER E WITH DIAERESIS
\xcc 204 CC LATIN CAPITAL LETTER I WITH GRAVE
\xcd 205 CD LATIN CAPITAL LETTER I WITH ACUTE
\xce 206 CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX
\xcf 207 CF LATIN CAPITAL LETTER I WITH DIAERESIS
\xd0 208 D0 LATIN CAPITAL LETTER ETH
\xd1 209 D1 LATIN CAPITAL LETTER N WITH TILDE
\xd2 210 D2 LATIN CAPITAL LETTER O WITH GRAVE
\xd3 211 D3 LATIN CAPITAL LETTER O WITH ACUTE
\xd4 212 D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
\xd5 213 D5 LATIN CAPITAL LETTER O WITH TILDE
\xd6 214 D6 LATIN CAPITAL LETTER O WITH DIAERESIS
\xd7 215 D7 MULTIPLICATION SIGN
\xd8 216 D8 LATIN CAPITAL LETTER O WITH SLASH
\xd9 217 D9 LATIN CAPITAL LETTER U WITH GRAVE
\xda 218 DA LATIN CAPITAL LETTER U WITH ACUTE
\xdb 219 DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX
\xdc 220 DC LATIN CAPITAL LETTER U WITH DIAERESIS
\xdd 221 DD LATIN CAPITAL LETTER Y WITH ACUTE
\xde 222 DE LATIN CAPITAL LETTER THORN
\xdf 223 DF LATIN SMALL LETTER SHARP S
\xe0 224 E0 LATIN SMALL LETTER A WITH GRAVE
\xe1 225 E1 LATIN SMALL LETTER A WITH ACUTE
\xe2 226 E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
\xe3 227 E3 LATIN SMALL LETTER A WITH TILDE
\xe4 228 E4 LATIN SMALL LETTER A WITH DIAERESIS
\xe5 229 E5 LATIN SMALL LETTER A WITH RING ABOVE
\xe6 230 E6 LATIN SMALL LETTER AE
\xe7 231 E7 LATIN SMALL LETTER C WITH CEDILLA
\xe8 232 E8 LATIN SMALL LETTER E WITH GRAVE
\xe9 233 E9 LATIN SMALL LETTER E WITH ACUTE
\xea 234 EA LATIN SMALL LETTER E WITH CIRCUMFLEX
\xeb 235 EB LATIN SMALL LETTER E WITH DIAERESIS
\xec 236 EC LATIN SMALL LETTER I WITH GRAVE
\xed 237 ED LATIN SMALL LETTER I WITH ACUTE
\xee 238 EE LATIN SMALL LETTER I WITH CIRCUMFLEX
\xef 239 EF LATIN SMALL LETTER I WITH DIAERESIS
\xf0 240 F0 LATIN SMALL LETTER ETH
\xf1 241 F1 LATIN SMALL LETTER N WITH TILDE
\xf2 242 F2 LATIN SMALL LETTER O WITH GRAVE
\xf3 243 F3 LATIN SMALL LETTER O WITH ACUTE
\xf4 244 F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
\xf5 245 F5 LATIN SMALL LETTER O WITH TILDE
\xf6 246 F6 LATIN SMALL LETTER O WITH DIAERESIS
\xf7 247 F7 DIVISION SIGN
\xf8 248 F8 LATIN SMALL LETTER O WITH SLASH
\xf9 249 F9 LATIN SMALL LETTER U WITH GRAVE
\xfa 250 FA LATIN SMALL LETTER U WITH ACUTE
\xfb 251 FB LATIN SMALL LETTER U WITH CIRCUMFLEX
\xfc 252 FC LATIN SMALL LETTER U WITH DIAERESIS
\xfd 253 FD LATIN SMALL LETTER Y WITH ACUTE
\xfe 254 FE LATIN SMALL LETTER THORN
\xff 255 FF LATIN SMALL LETTER Y WITH DIAERESIS
Forbidden:
\x00 0 00 NULL CHAR
\x01 1 01 START OF HEADING
\x02 2 02 START OF TEXT
\x03 3 03 END OF TEXT
\x04 4 04 END OF TRANSMISSION
\x05 5 05 ENQUIRY
\x06 6 06 ACKNOWLEDGEMENT
\x07 7 07 BELL
\x08 8 08 BACK SPACE
\t 9 09 HORIZONTAL TAB
\n 10 0A LINE FEED
\x0b 11 0B VERTICAL TAB
\x0c 12 0C FORM FEED
\r 13 0D CARRIAGE RETURN
\x0e 14 0E SHIFT OUT / X-ON
\x0f 15 0F SHIFT IN / X-OFF
\x10 16 10 DATA LINE ESCAPE
\x11 17 11 DEVICE CONTROL 1 (OFT. XON)
\x12 18 12 DEVICE CONTROL 2
\x13 19 13 DEVICE CONTROL 3 (OFT. XOFF)
\x14 20 14 DEVICE CONTROL 4
\x15 21 15 NEGATIVE ACKNOWLEDGEMENT
\x16 22 16 SYNCHRONOUS IDLE
\x17 23 17 END OF TRANSMIT BLOCK
\x18 24 18 CANCEL
\x19 25 19 END OF MEDIUM
\x1a 26 1A SUBSTITUTE
\x1b 27 1B ESCAPE
\x1c 28 1C FILE SEPARATOR
\x1d 29 1D GROUP SEPARATOR
\x1e 30 1E RECORD SEPARATOR
\x1f 31 1F UNIT SEPARATOR
" 34 22 QUOTATION MARK
* 42 2A ASTERISK
: 58 3A COLON
< 60 3C LESS-THAN SIGN
> 62 3E GREATER-THAN SIGN
? 63 3F QUESTION MARK
| 124 7C VERTICAL LINE
Screenshot of how Explorer sorts the files for me:
The highlighted file with the ? white smiley face was added manually by me (Alt+1) to show where this Unicode character (U+263A) ends up, see Jimbugs' answer.
The first file has a space as name (0x20), the second is the non-breaking space (0xa0). The files in the bottom half of the third row which look like they have no name use the characters with hex codes 0x81, 0x8D, 0x8F, 0x90, 0x9D (in this order from top to bottom).