Windows News and info 15th Anniversary 2009-2024

Windows 8 Common & Miscellaneous => Windows 8.1 Discussion => Topic started by: javajolt on March 01, 2014, 10:25:15 PM

Title: How Windows 8 treats whitespace characters in File and Folder names
Post by: javajolt on March 01, 2014, 10:25:15 PM
In computer typography, a white space is any character representing a horizontal or vertical space. When such whitespace characters are rendered, it will typically occupy space on a page, but its resulting appearance with be a ‘blank’. There are various whitespace characters representing various ‘space’ widths. Only the ASCII Space (0×20) and ASCII Period (0×24) characters are handled specially by the Object Manager.

(http://i60.tinypic.com/11c71ck.jpg)

Can you use whitespace characters in File and Folder names?

Windows 8, Windows RT and Windows Server 2012 treat Whitespace characters in File and Folder names as follows:

1. If a file is saved as ‘ Twc.txt’, where the leading character(s) is an ASCII Space (0×20), it will be saved as ‘Twc.txt’

2. If a file is saved as ‘Twc.txt ‘, where the trailing character(s) is an ASCII Space (0×20), it will be saved as ‘Twc.txt’.

3. If a file is saved as ‘ Twc.txt’, where the leading character(s) is an alternate whitespace character, such as the Ideographic Space (0×3000), it will be saved as ‘ Twc.txt ‘. The leading whitespace characters are not removed.

4. If a file is saved as ‘Twc.txt ‘, where the trailing character(s) is an alternate whitespace character, such as the Ideographic Space (0×3000), it will be saved as ‘Twc.txt ‘. The trailing whitespace characters are not removed.

5. If a file is saved as ‘.Twc.txt’, where the leading character(s) is an ASCII Period (0x2E), it will be saved as ‘.Twc.txt’.

6. If a file is saved as ‘Twc.txt.’, where the trailing character(s) is an ASCII Period (0x2E), it will be saved as ‘Twc.txt’.

Win32 and WinRT APIs have different ecosystem requirements, as a result of which, File and Folder names that begin or end with a whitespace character are enumerated differently by each of them

You can read more at KB2829981 (http://support.microsoft.com/kb/2829981).

source:thewindowsclub