PRB: Index Order Changed by UPPER() When EUROPEAN.MEM Used

Last reviewed: June 27, 1995
Article 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, <expC1>, <expC2>) 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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.