Collation Rule Definition

The collation rule is used to specify collation information for character data or metadata describing character data.<9> This is typically specified as part of the LOGIN7 message or part of a column definition in server results containing character data. For more information about column definition, see COLMETADATA.

 LCID             =   20BIT
 fIgnoreCase      =   BIT
 fIgnoreAccent    =   BIT
 fIgnoreWidth     =   BIT
 fIgnoreKana      =   BIT
 fBinary          =   BIT
 fBinary2         =   BIT
 fUTF8            =   BIT
 ColFlags         =   fIgnoreCase fIgnoreAccent fIgnoreKana
                      fIgnoreWidth fBinary fBinary2 fUTF8
 Version          =   4BIT
 SortId           =   BYTE
 COLLATION        =   LCID ColFlags Version SortId

A SQL collation is one of a predefined set of sort orders. The sort orders are identified with non-zero SortId values described by [MSDN-SQLCollation].

For a SortId==0 collation, the LCID bits correspond to a LocaleId as defined by the National Language Support (NLS) functions. For more details, see [MS-LCID].