[freetds] collate and TDS8
James K. Lowden
jklowden at schemamania.org
Sun Dec 8 10:15:40 EST 2002
On 07 Dec 2002 18:26:40 +0100, Frediano Ziglio <freddyz77 at tin.it> wrote:
>
> > Mine 0xd0 -> 0000 0000 1101 0000 -> third: 1 width insensitive 1
> > katatype insensitive 0 accent sensitive 1 case insensitive
> > Yours 0x100 -> 0000 0001 0000 0000 -> second: 0 0 0 1 binary third
> > 0000 all insensitive.
> > Other bits ??
> >
>
> Last nibble of bytes 2-3 is language modifier. Last byte is id or 0
> Other bits confirmed, see also attachment (extracted from query I send
> in previous mail)
>
> So now we know all bits of collation info. Problem is to use all info
> and how...
Frediano,
Nice work! Does this represent what we now know?
typedef struct
{
TDS_SMALLINT locale_id; /* master..syslanguages.lcid */
TDS_UCHAR unknown;
TDS_UCHAR sort_flags; /* high nybble only */
TDS_UCHAR charset_id; /* or zero */
} TDS8_COLLATION;
/* SF stands for "sort flag" */
#define TDS_SF_WIDTH_INSENSITIVE (TDS_UCHAR) 0x80
#define TDS_SF_KATATYPE_INSENSITIVE (TDS_UCHAR) 0x40
#define TDS_SF_ACCENT_SENSITIVE (TDS_UCHAR) 0x20
#define TDS_SF_CASE_INSENSITIVE (TDS_UCHAR) 0x10
--jkl
More information about the FreeTDS
mailing list