Compartilhar via


SYS(15) - Character Translation

Included for backward compatibility. Use SET COLLATE instead.

SYS(15, cTranslationExpression, cTranslated)

Return Values

Character

Parameters

  • cTranslationExpression
    Specifies the character expression that SYS(15) uses for the translation of cTranslated.
  • cTranslated
    Specifies the character expression that is translated. SYS(15) takes the first character in cTranslated and determines the character's ASCII value. The character in the same position in cTranslationExpression as the ASCII value is returned. This process is repeated for each additional character in cTranslated. If a character in cTranslated does not have a corresponding character in cTranslationExpression, then the character is not translated.

Included with Visual FoxPro is a memory variable file called EUROPEAN.MEM that contains sample translation characters. In FoxPro for MS-DOS and Visual FoxPro, EUROPEAN.MEM is located in the HOME( ) directory. In FoxPro for Macintosh, EUROPEAN.MEM is located in the Goodies:Misc folder.

Stored in EUROPEAN.MEM is a character memory variable called EUROPEAN, for use with SYS(15) in FoxPro for MS-DOS. Another character memory variable, EUROANSI, is provided for use with SYS(15) in Visual FoxPro and FoxPro for Macintosh. These memory variables can be used with SYS(15) to translate accented characters to the corresponding characters without the accents.

As an example, the following command can be used in FoxPro for MS-DOS to index a table on a field containing accented characters while preserving normal alphabetical order:

INDEX ON SYS(15, european, field) TO european

Remarks

This function is intended primarily for the convenience of European users who must use accented characters. Because there are different versions of most vowels, indexing on fields containing accented characters does not preserve the expected alphabetical order.

See Also

SYS( ) Functions Overview | SET COLLATE