Microsoft KB Archive/93334

{| = PRB: Index Order Changed by UPPER When EUROPEAN.MEM Used =
 * width="100%"|

ID: Q93334

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
 * Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS
When FoxPro builds an index with EUROPEAN.MEM and the UPPER function, the resulting index appears to be in an incorrect order.

CAUSE
EUROPEAN.MEM is a memory-variable file that contains a translation table for European users that use letters with diacritical marks. Because the table does not contain a translation for the uppercase versions of the letters, the INDEX statement ignores the translation and builds the table accordingly.

RESOLUTION
Remove the call to the UPPER function and create the index based on the lowercase letters.

MORE INFORMATION
The SYS(15, , ) function performs the actual translation between the table and a given field(s).

The following example creates an index file that properly interprets the diacritical marks and maintains the correct alphabetic order:

RESTORE FROM c:\foxpro2\goodies\misc\european.mem INDEX ON SYS(15, EUROPEAN, field_1) TO file In the following example, the translations do not have any effect because each of the fields is in uppercase letters. The resulting index does not appear to be in alphabetical order. INDEX ON SYS(15, EUROPEAN, UPPER(field_1)) TO file Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a SYS(15) UPPER 2.x upper-case lower-case capital letters umlaut diaeresis dieresis circumflex accent international acute grave macron cedilla KBCategory: kbenv kbprg kbprb KBSubcategory: FxenvMemory
 * }