SET COLLATE Command

Specifies a collation sequence for character fields in subsequent indexing and sorting operations.

SET COLLATE TO cSequenceName

Parameters

cSequenceName

Specifies a collation sequence. The following table lists collation sequence options that are available.

cSequenceName Language

ARABIC

Arabic

CZECH

Czech

DUTCH

Dutch

GENERAL

English, French, German, Modern Spanish, Portuguese, and other Western European languages

GERMAN

German phone book order (DIN)

GREEK

Greek

HEBREW

Hebrew

HUNGARY

Hungarian

ICELAND

Iceland

JAPANESE

Japanese

KOREAN

Korean

MACHINE

Machine (the default collation sequence for earlier FoxPro versions)

NORDAN

Norwegian, Danish

PINYIN

Simplified Chinese

POLISH

Polish

RUSSIAN

Russian

SLOVAK

Slovak

SPANISH

Traditional Spanish

STROKE

Simplified and traditional Chinese

SWEFIN

Swedish, Finnish

THAI

Thai

TURKISH

Turkish

UNIQWT

Unique Weight

NoteNote

When you specify the SPANISH option, "ch" is a single letter that sorts between "c" and "d", and "ll" sorts between "l" and "m". If you specify a collation sequence option as a literal character string, be sure to enclose the option in quotation marks:

 CopyCode imageCopy Code
SET COLLATE TO "SWEFIN"

MACHINE is the default collation sequence option and is the sequence FoxPro users are familiar with. Characters are ordered as they appear in the current code page. The MACHINE collation sequence provides the best performance. Using a collating sequence other than MACHINE may reduce performance primarily in comparison and indexing operations, and may create larger index files.

GENERAL might be preferable for U.S. and Western European users. Characters are ordered as they appear in the current code page. In FoxPro versions earlier than 2.5, you might have used UPPER( ) or LOWER( ) on character fields when you created indexes. In FoxPro versions later than 2.5, you can specify the GENERAL collation sequence option and omit the UPPER( ) conversion instead.

If you specify a collation sequence option other than MACHINE, and if you create an .idx file, a compact .idx is always created.

Use SET("COLLATE") to return the current collation sequence.

If you include the following line in your Visual FoxPro configuration file, a collation sequence is specified when you start Visual FoxPro:

 CopyCode imageCopy Code
COLLATE = cSequenceName

This is identical to issuing the following command:

 CopyCode imageCopy Code
SET COLLATE TO cSequenceName

Expand imageRemarks

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic