Microsoft KB Archive/68980

How COUNTRY Affects Sort Order PSS ID Number: Q68980 Article last modified on 02-05-1993 PSS database name: O_MSDOS

4.00 4.01

MS-DOS

Question:

How does the COUNTRY setting in the CONFIG.SYS file affect sort order?

Response:

The COUNTRY setting can affect how MS-DOS performs a sort. All COUNTRY settings sort alphabetical characters from A to Z; however, different COUNTRY settings sort the characters outside this range differently. For example, if COUNTRY=034 for Spain, then the space character will come before any other character when sorted. However, if COUNTRY=001, the space character will be placed after the ASCII characters 0 through 31.

MS-DOS maintains an internal collating table for each country code. The United States, United Kingdom, France, Italy, and Germany use the same collating table. Latin America and Spain share the same table. Finland and Sweden share the same table. Other countries, such as Netherlands, Denmark, Belgium, Norway, Canada, and Portugal all have unique collating tables.

A program may call interrupt 21H function 65H subfunction 06H to obtain a pointer to the current collating table. By accessing the current collating table when performing a sort, a program will not be limited to the collating order of a single country.

Additional reference words: 4.00 4.01 noupd

Copyright Microsoft Corporation 1993.