<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx</link><description>Earlier this morning, Peter Ibbotson asked me: Perhaps you explain something to me (I appreciate you may be the wrong person to ask, but you seem to be a sorting expert). When XP was in beta I put a bug report on this odd sorting behaviour with explorer,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#346940</link><pubDate>Wed, 05 Jan 2005 16:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:346940</guid><dc:creator>Tad</dc:creator><description>So what was there clever solution to sorting the numbers in &lt;a title="StrCmpLogicalW" href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strcmplogicalw.asp" target="_blank"&gt;StrCmpLogicalW&lt;/a&gt;?  Just curious...</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#346945</link><pubDate>Wed, 05 Jan 2005 17:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:346945</guid><dc:creator>Michael Kaplan</dc:creator><description>Heh heh heh.... good question. Of course its not *my* clever solution so I don't want to make it sound like I am bragging (I'm not).&lt;br&gt;&lt;br&gt;Let's just say that whoever wrote the code is a hire. :-)</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347221</link><pubDate>Wed, 05 Jan 2005 22:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347221</guid><dc:creator>Dean Harding</dc:creator><description>One possible way would be to go through each file name and pad any numbers with zero up to a fixed length and then sort with the regular &lt;a title="CompareString" href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/comparestring.asp" target="_blank"&gt;CompareString&lt;/a&gt; function.&lt;br&gt;&lt;br&gt;The only two problems with that would be 1. It's not very efficient to modify all the file names, especially for very long directory listings, and 2. It's difficult to know how much padding you need.&lt;br&gt;&lt;br&gt;For 2. the obvious solution is to check the maximum length of a string of digits in all the file names and use that (so for example, if you have 3.txt and 1000.txt then you need to pad the first file with three zeros), but that just makes 1. more obvious (since you need to loop through all the file names once to find the maximum length of a string of digits, and again to actually pad digits).&lt;br&gt;&lt;br&gt;For 1. I'm not sure how you could make it quicker, and still be able to use the normal CompareString to do the main work, because you'd /want/ to use the normal CompareString function otherwise you'd end up having to rewrite a very complex function for a fairly small gain.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347313</link><pubDate>Wed, 05 Jan 2005 23:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347313</guid><dc:creator>Michael Kaplan</dc:creator><description>Re: clever -- Raymond Chen pointed out to me a slightly less cool version of this code that used to be around which was much less clever. To be clear I am talking about the code that shipped with Server 2003 and then later in XP service packs.... :-) &lt;br&gt;&lt;br&gt;To Dean -- think of another issue -- what about the file A1A1A1A1A1A1A1A1A1A1A1A1A1A1.txt? Do you extend every one of those numbers?</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347324</link><pubDate>Thu, 06 Jan 2005 00:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347324</guid><dc:creator>Dean Harding</dc:creator><description>Ah, good point.&lt;br&gt;&lt;br&gt;OK, another solution would be to sort it normally first.  This'll get all the text-based ordering out of the way, and at least all the files with the same prefix and numbered suffixes will be together.  So lets say you start off like this:&lt;br&gt;&lt;br&gt;a.txt, b1.txt, def20.txt, b20.txt, def6.txt, b9.txt, c.txt&lt;br&gt;&lt;br&gt;After you do your normal &lt;a title="CompareString" href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/comparestring.asp" target="_blank"&gt;CompareString&lt;/a&gt; sort, you'd have this:&lt;br&gt;&lt;br&gt;a.txt b1.txt, b20.txt, b9.txt, c.txt, def20.txt, def6.txt&lt;br&gt;&lt;br&gt;Then you can group them so that files with the same prefix followed by a digit are in a group, this'd give two groups:&lt;br&gt;&lt;br&gt;b1.txt, b20.txt, b9.txt and&lt;br&gt;def20.txt, def6.txt&lt;br&gt;&lt;br&gt;Then it's just a matter of extracting the number from the correct position in each file name, and sorting by that number in-place.  So your two groups become:&lt;br&gt;&lt;br&gt;b1.txt, b9.txt, b20.txt and&lt;br&gt;def6.txt, def20.txt&lt;br&gt;&lt;br&gt;And the whole thing is:&lt;br&gt;&lt;br&gt;a.txt, b1.txt, b9.txt, b20.txt, c.txt, def6.txt, def20.txt&lt;br&gt;&lt;br&gt;This way, you don't modify strings, you don't have to worry about padding with zero, and you'll still get the correct answer (I think :)</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347344</link><pubDate>Thu, 06 Jan 2005 00:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347344</guid><dc:creator>Norman Diamond</dc:creator><description>&amp;gt; Mom: How can a number be text?&lt;br&gt;&lt;br&gt;Send her back for a refresher in grade 4 arithmetic, or somewhere around there.  The difference between numbers and numerals was taught there, and numerals are text.  Different numeral bases came up in grade 6, which should make it more obvious that numerals are text.&lt;br&gt;&lt;br&gt;Nonetheless, sorting them as numbers instead of numerals is indeed agreeable 95% of the time.  I only wonder, as you said you do, why Windows Explorer only does it around 50% of the time instead of 95% of the time.&lt;br&gt;&lt;br&gt;Since there are some APIs now that recognize the numericity of various kinds of characters, one would think that Explorer would properly sort the department names of the company that I work in, but no I have to find the folder in order by the pronunciation of the number[*] instead of the numeric value.  Dai-ichi-nani-nani, dai-san-nani-nani, dai-yon-nani-nani[*], dai-ni-nani-nani, 1 3 4 2 and the 4 isn't even in the expected place by pronunciation[*].&lt;br&gt;&lt;br&gt;[* The matter of multiple pronunciations of a Kanji has been discussed in other threads.  The character meaning four is getting sorted by pronunciation shi instead of yon, which is understandable but still not the first place one would look for it.  I've never heard anyone say &amp;quot;dai-shi-nani-nani&amp;quot;, it's &amp;quot;dai-yon-nani-nani&amp;quot;.]</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347377</link><pubDate>Thu, 06 Jan 2005 02:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347377</guid><dc:creator>Michael Kaplan</dc:creator><description>&amp;gt; Send her back for a refresher in grade 4 arithmetic, or somewhere around there. &lt;br&gt;&lt;br&gt;Well, I will leave aside the fact that I would not talk to my mother that way, and point out that it would really not behoove Microsoft well to treat customers that way. So I will avoid that approach. :-)&lt;br&gt;&lt;br&gt;&amp;gt; Since there are some APIs now that recognize the numericity of various kinds of characters&lt;br&gt;&lt;br&gt;Well, the function in Windows today only handles 0123456789 -- the &amp;quot;ASCII digit&amp;quot; collection. It might be cool to do more, but you start running in to problems when you try to define what &amp;quot;more&amp;quot; should be since it is not always intuitive.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347455</link><pubDate>Thu, 06 Jan 2005 05:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347455</guid><dc:creator>Marcel</dc:creator><description>OK, I like hacks, so what about this:&lt;br&gt;&lt;br&gt;Go through the strings and contract all consecutive digits into a single character, for example in the Unicode Private Use Area. After that sort the strings in a normal way (provided the sort routine sorts PUAs according to their value). Prepending the private character with a fixed '0' could also ensure that it is sorted in the place of ASCII digits.&lt;br&gt;&lt;br&gt;X1A.TXT -&amp;gt; X0'U+E001'A.TXT&lt;br&gt;X13.TXT -&amp;gt; X0'U+E00D'.TXT&lt;br&gt;XAB.TXT -&amp;gt; XAB.TXT</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347480</link><pubDate>Thu, 06 Jan 2005 06:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347480</guid><dc:creator>Norman Diamond</dc:creator><description>&amp;gt;&amp;gt; Since there are some APIs now that&lt;br&gt;&amp;gt;&amp;gt; recognize the numericity of various kinds&lt;br&gt;&amp;gt;&amp;gt; of characters &lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Well, the function in Windows today only&lt;br&gt;&amp;gt; handles 0123456789 -- the &amp;quot;ASCII digit&amp;quot;&lt;br&gt;&amp;gt; collection.&lt;br&gt;&lt;br&gt;Where did I read that Windows APIs were added that recognized Thai digits and various other code page digits.  I'm sure I asked somewhere and received an answer that Windows Explorer is only designed to recognize the numericity of ASCII digits, but the function in Windows today is comparatively internationalized.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347511</link><pubDate>Thu, 06 Jan 2005 08:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347511</guid><dc:creator>Raymond Chen</dc:creator><description>Norman: Are you arguing that Explorer should sort files as follows:&lt;br&gt;&lt;br&gt;two.txt&lt;br&gt;five.txt&lt;br&gt;sex.txt&lt;br&gt;elf.txt&lt;br&gt;three hundred.txt&lt;br&gt;&lt;br&gt;? &lt;br&gt;</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347529</link><pubDate>Thu, 06 Jan 2005 09:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347529</guid><dc:creator>Michael Kaplan</dc:creator><description>Norman, re: Thai digits you are mistaken.&lt;br&gt;&lt;br&gt;Speaking personally, I never claimed this API was interationalized, and I pointed out that doing so leads one to problems of non-intuitive behavior.&lt;br&gt;&lt;br&gt;There are many functions in Windows that are well-internationalized. This not one of them, certainly when looking at other language digits.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347531</link><pubDate>Thu, 06 Jan 2005 09:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347531</guid><dc:creator>Michael Kaplan</dc:creator><description>Marcel -- interestng thought. Though one of the problems with that plan is that it puts digits in a wierd place compared to other characters (since the PUA has weight that puts it somewhere very unlike where numbers go). &lt;br&gt;&lt;br&gt;The fact that these code points already have weight that needs to be primary between them will also lead to problems&lt;br&gt;&lt;br&gt;And of course it still isn't an unbounded answer....&lt;br&gt;&lt;br&gt;FWIW, I am not going to be hiring anyone based on their anwsers. But I am impressed at the quality of the answers. :-)</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347579</link><pubDate>Thu, 06 Jan 2005 11:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347579</guid><dc:creator>Mike Williams</dc:creator><description>If you run a search on filenames via Explorer, the results always seem to come back in strict order (ie not using &lt;a title="StrCmpLogicalW" href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strcmplogicalw.asp" target="_blank"&gt;StrCmpLogicalW&lt;/a&gt;) and also in lower-case for some reason. Can you shed any light on this? It's a little frustrating trying to filter a folder using a filename substring and having the results presenetd differently to a regular Explorer listing.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347618</link><pubDate>Thu, 06 Jan 2005 13:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347618</guid><dc:creator>Marcel</dc:creator><description>&amp;gt; Though one of the problems with&lt;br&gt;&amp;gt; that plan is that it puts digits &lt;br&gt;&amp;gt; in a wierd place compared to &lt;br&gt;&amp;gt; other characters&lt;br&gt;&lt;br&gt;Therefore the prepended '0', which makes all those private values primarily sort into the same spot (of U+0030) and only secondarily use the PUA value.&lt;br&gt;&lt;br&gt;But true, it's not unbound, though the range should be big enough to sort a few photos. Anyway, it was good enough for me considering I came up with it after a long night's work at 7am in my time zone ;-)</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#347709</link><pubDate>Thu, 06 Jan 2005 15:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347709</guid><dc:creator>Michael Kaplan</dc:creator><description>Hi Mike -- The Shell filtering functionality and the way help indexing works are both topics I will have to cover another day. I find them frustrating, too....&lt;br&gt;&lt;br&gt;Marcel -- I understood that part, I was more interested in how you would handle the string that was engineered to look the same (i.e. sends those exact PUA values). I am not slsmming the idea though, I was just pointing out the problems -- so you wouldn't feel like it had not been thought of and discarded regretfully. :-)</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#348064</link><pubDate>Fri, 07 Jan 2005 00:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:348064</guid><dc:creator>Norman Diamond</dc:creator><description>1/6/2005 12:24 AM Raymond Chen&lt;br&gt;&lt;br&gt;&amp;gt; Norman: Are you arguing that Explorer should&lt;br&gt;&amp;gt; sort files as follows: &lt;br&gt;&amp;gt; two.txt &lt;br&gt;&amp;gt; five.txt&lt;br&gt;[...]&lt;br&gt;&lt;br&gt;Good point.  But I really thought I had read somewhere that Windows APIs had been augmented to recognize digits written in various linguistic character sets.  And we both know that digits as written in Chinese characters can (and often are) strung together as digit sequences.&lt;br&gt;&lt;br&gt;Full formal wording is a more difficult question since, even though each character is numeric, how do we say if the full formal construction is a numeral or a word phrase?&lt;br&gt;&lt;br&gt;1/6/2005 1:13 AM Michael Kaplan&lt;br&gt;&lt;br&gt;&amp;gt; Norman, re: Thai digits you are mistaken.&lt;br&gt;&lt;br&gt;OK, I can't find where I read that Windows APIs had been augmented in that manner.  On the other hand though, I saw a Thai use Thai digits and saw Windows accept them.  And that was Windows XP Japanese (not Thai, not US with MUI, not anything else) with the input locale set to Thai.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#348075</link><pubDate>Fri, 07 Jan 2005 00:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:348075</guid><dc:creator>Michael Kaplan</dc:creator><description>Well digits are accepted. But there is no Windows API that readds them as numbers.&lt;br&gt;&lt;br&gt;Either someone was mistaken when they spoke or you read them wrong. This applies to every version of Windows, no matter what the input locale is.&lt;br&gt;&lt;br&gt;Perhaps you are talking about unrelated issues with GDI and rendering based on native digits in a locale, but if so that has nothing to do with collation.</description></item><item><title>The Daily Grind 533</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#349575</link><pubDate>Sun, 09 Jan 2005 23:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:349575</guid><dc:creator>TrackBack</dc:creator><description>The Daily Grind 533</description></item><item><title>numeric file rename</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#349576</link><pubDate>Sun, 09 Jan 2005 23:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:349576</guid><dc:creator>TrackBack</dc:creator><description>numeric file rename</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#350201</link><pubDate>Mon, 10 Jan 2005 22:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:350201</guid><dc:creator>Larry Osterman</dc:creator><description>Btw, Valorie's been on me for literally years now about the fact that OE doesn't sort email messages with text in them.&lt;br&gt;&lt;br&gt;She hates it that OE sorts:&lt;br&gt;This is message one of three&lt;br&gt;This is message two of three&lt;br&gt;This is message three of three&lt;br&gt;&lt;br&gt;as:&lt;br&gt;This is message one of three&lt;br&gt;This is message three of three&lt;br&gt;This is message two of three&lt;br&gt;&lt;br&gt;</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#350208</link><pubDate>Mon, 10 Jan 2005 22:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:350208</guid><dc:creator>Michael Kaplan</dc:creator><description>I just mentioned the notion of addressing this to the owner of the collation data and her look could have killed. :-)&lt;br&gt;&lt;br&gt;Though I am inclined to agree with her -- its a dangerous road to go down for an API like &lt;a title="CompareString" href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/comparestring.asp" target="_blank"&gt;CompareString&lt;/a&gt;. Or even for higher level callers like OE (luckily most of them are sorted by date anyway).</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#352892</link><pubDate>Fri, 14 Jan 2005 11:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:352892</guid><dc:creator>Peter Ibbotson</dc:creator><description>Thanks for that, I'd still like an option to turn it off though. One of the problems I have is that I have loads of file names with that kind of structure, and depending on what program I'm using to look at files, the file I want may be at either end of a list. &lt;br&gt;It's a real pain as you swap between source control and explorer.&lt;br&gt;Anyway thanks</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#352948</link><pubDate>Fri, 14 Jan 2005 15:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:352948</guid><dc:creator>Michael Kaplan</dc:creator><description>Hi Peter,&lt;br&gt;&lt;br&gt;It actually *can* be changed via a Group Policy setting. Precisely because not everyone will neccesarily like it.... &lt;br&gt;&lt;br&gt;You can even query this policy's settings with the &lt;a title="SHRestricted" href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shrestricted.asp" target="_blank"&gt;SHRestricted&lt;/a&gt; API and the REST_NOSTRCMPLOGICAL member of the &lt;a title="RESTRICTIONS" href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/enums/RESTRICTIONS.asp" target="_blank"&gt;RESTRICTIONS&lt;/a&gt; enumeration.</description></item><item><title>Its about File Sorting</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#361402</link><pubDate>Thu, 27 Jan 2005 10:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361402</guid><dc:creator>Vinod Kumar's Blog</dc:creator><description /></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#361495</link><pubDate>Thu, 27 Jan 2005 10:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361495</guid><dc:creator>Mike Williams</dc:creator><description>The other sorting annoyance is this sort of thing:&lt;br&gt;&lt;br&gt;The Sea II.mp3&lt;br&gt;The Sea.mp3&lt;br&gt;&lt;br&gt;This is also seen with Windows Media Player's Album list.</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#361499</link><pubDate>Thu, 27 Jan 2005 10:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:361499</guid><dc:creator>Michael Kaplan</dc:creator><description>Yes, though (to me) it actually does make sense since space comes before dot....&lt;br&gt;&lt;br&gt;Though I would not mind if Explorer removed the extension from consideration for the sort, except to break ties. It seems like the results would be more intuitive more often.</description></item><item><title>Windows Explorer vs Geeks (or Intuitive filename sorting)</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#404745</link><pubDate>Fri, 01 Apr 2005 22:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404745</guid><dc:creator>Rolando Ramirez's WebLog</dc:creator><description /></item><item><title>What is up with number sorting, redux</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#404831</link><pubDate>Sat, 02 Apr 2005 02:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404831</guid><dc:creator>Sorting It All Out</dc:creator><description /></item><item><title /><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#405171</link><pubDate>Mon, 04 Apr 2005 11:52:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:405171</guid><dc:creator>Ramblings by PeterI</dc:creator><description>Back in January I asked Michael Kaplan about the explorers number&amp;amp;#160;sorting order here.Meanwhile over here Rolando Ramirez has pointed out that this in TweakUI. Oddly when I mentioned this in the office someone else piped up and told me how to tweak it via</description></item><item><title>Similar descriptions does not mean similar methodologies</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#415523</link><pubDate>Sun, 08 May 2005 20:47:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:415523</guid><dc:creator>Sorting It All Out</dc:creator><description>The other day, I had to take a look at the various unmanaged case insensitive string comparison functions....</description></item><item><title>Why do NTFS and Explorer disagree on filename sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#430196</link><pubDate>Fri, 17 Jun 2005 18:17:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430196</guid><dc:creator>The Old New Thing</dc:creator><description>Because they have different goals.</description></item><item><title>Did software developers ever learn their ABC's?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#701014</link><pubDate>Tue, 15 Aug 2006 14:43:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:701014</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;br&gt;Developers always think they are right. &lt;br&gt;Especially when they are not.&lt;br&gt;I mean, if you asked any random...</description></item><item><title>StrCmp for humans? It's in there!</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#778346</link><pubDate>Sat, 30 Sep 2006 20:59:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:778346</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;br&gt;Igor Levicki asked in the Suggestion Box: &lt;br&gt;&lt;br&gt;Any chance to enlighten as whether Windows Explorer in...</description></item><item><title>Logical StrCmpLogicalW changes in Vista</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#779118</link><pubDate>Sun, 01 Oct 2006 10:04:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:779118</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;br&gt;I mentioned yesterday in StrCmp for humans? It's in there! that some change happened in the behavior...</description></item><item><title>What would it mean to internationalize StrCmpLogicalW?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#786232</link><pubDate>Tue, 03 Oct 2006 19:40:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:786232</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;If you are a regular reader of this blog then odds are you might be a little sick of hearing about StrCmpLogicalW&lt;/p&gt;
</description></item><item><title>Sorting numbers as text AND as digits</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#1264969</link><pubDate>Tue, 12 Dec 2006 11:33:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1264969</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;It's funny, but the past few years whenever I have had to fly I have noticed (whether sitting in my scooter&lt;/p&gt;
</description></item><item><title>Fractions may be your friends, but they won't pick you up at the airport!</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#3869207</link><pubDate>Sat, 14 Jul 2007 22:03:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3869207</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;To me, fractions will always have a special place. The teacher pointed out we all knew what &amp;#189; was, and&lt;/p&gt;
</description></item><item><title>Docs can whet SiaO's appetite, but where's the blog?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5071250</link><pubDate>Sun, 23 Sep 2007 13:31:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5071250</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;As I mentioned back in How do I feel about lstrcmpi? I think it blows.... , the Mac CFString stuff has&lt;/p&gt;
</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5427863</link><pubDate>Fri, 12 Oct 2007 22:57:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5427863</guid><dc:creator>James</dc:creator><description>&lt;p&gt;If the shell team is so &amp;quot;amazing&amp;quot;, they should add an option to disable number sorting. Its very annoying when file names contain numbers and some of the numbers have leading zeros. I expect this sort order:&lt;/p&gt;
&lt;p&gt;000.txt&lt;/p&gt;
&lt;p&gt;003.txt&lt;/p&gt;
&lt;p&gt;020.txt&lt;/p&gt;
&lt;p&gt;100.txt&lt;/p&gt;
&lt;p&gt;but now I get this:&lt;/p&gt;
&lt;p&gt;000.txt&lt;/p&gt;
&lt;p&gt;100.txt&lt;/p&gt;
&lt;p&gt;020.txt&lt;/p&gt;
&lt;p&gt;003.txt&lt;/p&gt;
&lt;p&gt;Sometimes the reason we added leading zeros to the filename in the first place was to make the files sort correctly, now its broken again :-(&lt;/p&gt;
&lt;p&gt;File names are text and should be able to be sorted as such.&lt;/p&gt;
&lt;p&gt;Gee Thanks for this &amp;quot;new feature&amp;quot;!&lt;/p&gt;</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5428156</link><pubDate>Fri, 12 Oct 2007 23:17:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5428156</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;James,&lt;/p&gt;
&lt;p&gt;They do have such an option.&lt;/p&gt;
&lt;p&gt;But FWIW I do not see the results you list here -- prefix zeroes still work fine for me.&lt;/p&gt;
</description></item><item><title>All things being equal, your mom probably has an easier time with case insensitivity than not</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5692497</link><pubDate>Fri, 26 Oct 2007 18:14:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5692497</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;So, response to the recent In Case you have problems that you might think are ǸȦȘȚȲ , Jeff (I suspect&lt;/p&gt;
</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5695582</link><pubDate>Fri, 26 Oct 2007 23:36:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5695582</guid><dc:creator>Maurits</dc:creator><description>&lt;p&gt;&amp;gt; sex.txt&lt;/p&gt;
&lt;p&gt;&amp;gt; elf.txt&lt;/p&gt;
&lt;p&gt;(Um, ew.)&lt;/p&gt;
&lt;p&gt;From personal experience, this number sorting thing is REALLY ANNOYING when you're looking at a huge list of subdirectories, all of which are GUIDs.&lt;/p&gt;
&lt;p&gt;I agree with those that want an option to turn it off.&lt;/p&gt;
&lt;p&gt;I might argue that the most important part of /any/ feature is the ability to turn it off.&lt;/p&gt;
&lt;p&gt;Bury the off switch somewhere Mom can't find it, if it makes you feel better. &amp;nbsp;But implement the off switch before implementing the feature.&lt;/p&gt;
</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5695586</link><pubDate>Fri, 26 Oct 2007 23:38:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5695586</guid><dc:creator>Maurits</dc:creator><description>&lt;p&gt;(Now that I actually read the comments)&lt;/p&gt;
&lt;p&gt;&amp;gt; It actually *can* be changed via a Group Policy setting&lt;/p&gt;
&lt;p&gt;Ah, perfect.&lt;/p&gt;
</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5695603</link><pubDate>Fri, 26 Oct 2007 23:41:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5695603</guid><dc:creator>Maurits</dc:creator><description>&lt;p&gt;Your links 404 though. &amp;nbsp;Here's what I found by searching MSDN:&lt;/p&gt;
&lt;p&gt;SHRestricted: &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb762245.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb762245.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;RESTRICTIONS: &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb762534.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb762534.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: What is up with number sorting?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#5695861</link><pubDate>Sat, 27 Oct 2007 00:19:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5695861</guid><dc:creator>Maurits</dc:creator><description>&lt;p&gt;Oy. &amp;nbsp;I've dug through gpedit.msc on Vista RTM and I can't find anything that looks like it might be this option. &amp;nbsp;Can I buy a vowel?&lt;/p&gt;
</description></item><item><title>Incomplete Scenarios: They don't know everything that's up with number sorting</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#6836325</link><pubDate>Sat, 22 Dec 2007 18:16:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6836325</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;In just a few weeks from now, it will have been three years since I first wrote about What is up with&lt;/p&gt;</description></item><item><title>Insanity defined: In the real world -0 == 0, in Vista -0 &lt; 0, and in Windows Server 2008 -0 ≮ 0</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#7794876</link><pubDate>Tue, 19 Feb 2008 18:01:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7794876</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;Somewhere in between zero and the smallest possible negative number there lies another number. NEGATIVE&lt;/p&gt;
</description></item><item><title>Consistency in the Windows Shell is not overrated; it's just underobserved!</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#8028189</link><pubDate>Tue, 04 Mar 2008 18:17:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8028189</guid><dc:creator>Sorting it all Out</dc:creator><description>&lt;p&gt;Please read the disclaimer ; content not approved by Microsoft! You may have been around in January 2005,&lt;/p&gt;
</description></item><item><title>How the @#%&amp;*! does CBS_SORT choose to sort it all out?</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#9022297</link><pubDate>Wed, 29 Oct 2008 17:06:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9022297</guid><dc:creator>Sorting it all Out</dc:creator><description>&lt;p&gt;The question was an interesting one: My customer has a tree control with nodes sorted using CString::Compare().&lt;/p&gt;
</description></item><item><title>Natural sort order of strings and files</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#9063804</link><pubDate>Wed, 12 Nov 2008 21:54:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9063804</guid><dc:creator>Greg Beech's Tech Blog</dc:creator><description>&lt;p&gt;In Windows XP and Vista the algorithm used to sort files by name in Explorer does not simply compare&lt;/p&gt;
</description></item><item><title>"If you haven't had sex is six months..." the IM read</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#9180258</link><pubDate>Fri, 05 Dec 2008 18:11:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9180258</guid><dc:creator>Sorting it all Out</dc:creator><description>&lt;p&gt;The mail I got the other day from Brett was pretty amusing (reposted uncensored with his permission,&lt;/p&gt;
</description></item><item><title>CString - Sortierung | hilpers</title><link>http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx#9347503</link><pubDate>Tue, 20 Jan 2009 17:45:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9347503</guid><dc:creator>CString - Sortierung | hilpers</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.hilpers.com/956749-cstring-sortierung"&gt;http://www.hilpers.com/956749-cstring-sortierung&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>