I fell into this problem as well about 5 weeks ago.
set the environment variable
....
export LC_ALL=C
sort .....
and the proper collating sequence will prevail.
Â
Regards
 Leslie
Mr. Leslie Satenstein
SENT FROM MY OPEN SOURCE LINUX SYSTEM.
>________________________________
>
>
>$ sort --version
>sort (GNU coreutils) 5.97
>Copyright (C) 2006 Free Software Foundation, Inc.
>This is free software. You may redistribute copies of it under the terms of
>the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
>There is NO WARRANTY, to the extent permitted by law.
>
>Written by Mike Haertel and Paul Eggert.
>----------------------------------------------------------------------------------------------------------
>(2) When I sort the following,
>
>Â Â ../include/CcMsgFxStrm.h
>Â Â ../include/CDesEncrypt.h
>Â Â ../include/CEncrypt.h
>Â Â include/CFixFX_Config.h
>Â Â include/CFixFX_Handler.h
>Â Â include/CFixFX_Server.h
>Â Â ../include/CFxBaseMsg.h
>Â Â include/CFXBookManager.h
>
>I am expecting for all the ../include's to bunch up before or after all
>the include's. But, the above is already in sorted order, according to
>sort! Something doesn't seem right. Is there a bug?
>----------------------------------------------------------------------------------------------------------
>(3) If I write a C++ program as follows,
>
># include <cstdio>
># include <vector>
># include <iostream>
>using namespace std;
>
>int
>main ()
>{
>Â Â vector<string> lines;
>Â Â char buf[1024];
>Â Â for (int i = 0; fgets (buf, sizeof buf, stdin); i++)
>Â Â Â Â lines.push_back (buf);
>Â Â for (int i = 0, sz = lines.size (); i < sz; i++)
>Â Â Â Â for (int j = i + 1; j < sz; j++)
>Â Â Â Â Â Â if (lines[j] < lines[i])
>Â Â Â Â Â Â {
>Â Â Â Â Â Â Â Â string t = lines[i];
>Â Â Â Â Â Â Â Â lines[i] = lines[j];
>Â Â Â Â Â Â Â Â lines[j] = t;
>Â Â Â Â Â Â }
>Â Â for (int i = 0, sz = lines.size (); i < sz; i++)
>Â Â Â Â cout << lines[i];
>}
>
>For the above input, I get the following output,
>
>Â Â ../include/CDesEncrypt.h
>Â Â ../include/CEncrypt.h
>Â Â ../include/CFxBaseMsg.h
>Â Â ../include/CcMsgFxStrm.h
>Â Â include/CFXBookManager.h
>Â Â include/CFixFX_Config.h
>Â Â include/CFixFX_Handler.h
>Â Â include/CFixFX_Server.h
>----------------------------------------------------------------------------------------------------------
>(4) Thanks for looking into this and sending me a reply.
>
>
>
>
>
>
>
>