Computer Active (UK)

Can I put a question mark in a filename?

-

QWhy is it that I can’t include a question mark (and other symbols) in a Windows filename? I’ve occasional­ly wanted to add a question mark to the end of a filename. I thought I’d found a workaround by using the Symbol dialogue in Word 2010, where I’d found a symbol that looked like a question mark. I copied and pasted this to rename an existing JPEG file and it seemed to work, albeit with an extra space in front of the question mark. The image opened in Photoshop, but a resizing tool that I use would not recognise it. Could you explain?

Paul Bath

AThis is because Windows relies on several ‘reserved’ characters, which include the question mark. This small selection of symbols serve other purposes in the operating system. In particular, the question mark acts as a single-character ‘wild card’ in File Manager searches. For example, type ???.doc into the Search box at the top right of the File Explorer window and you’ll be presented with a list of all files with any three characters in the file name, but only those with .doc as the file extension. So, you see why a question mark in a filename would confound Windows.

You’ve figured out that a workaround is to use a non-reserved symbol that looks like the one you want. This works because the alternativ­e symbol uses a different underlying code to the reserved character, so to Windows it’s a different thing — even if it looks the same to you. The underlying code numbers that describe every character are known as unicode, and are usually expressed in hexadecima­l. For example, the hexadecima­l unicode FF1F (65311 in decimal) represents a symbol that looks just like the reserved question mark. The hex unicode for the question mark symbol reserved by Windows is 3F (63 in decimal), so you’re free to use the FF1F symbol.

You can try this out yourself in Word by typing the hex unicode FF1F and then immediatel­y afterwards pressing Alt+x (see screenshot above). You can do the same with 3F, incidental­ly. They both look like question marks, but to Windows only 3F is the question mark. You’re free to use the FF1F unicode symbol in file names – simply copy and paste it into the ‘File name’ field (see screenshot left). To look up the unicode for any symbol, choose the Insert tab, then click Symbol followed by More Symbols. Now set the ‘from’ dropdown to ‘Unicode (hex)’, then just click a character to see its unicode displayed next to ‘Character code’.

However, you’ve already found that one of your programs doesn’t recognise the symbol you’ve chosen. This is because it does not support the full unicode character map, and sadly there’s nothing that can be done about that. Moreover, if you send files to others then be aware that the filenames you’ve used might not be recognised by other operating systems or devices.

 ??  ??
 ??  ??

Newspapers in English

Newspapers from United Kingdom