Skip to Content.
Sympa Menu

freetds - Re: [freetds] collate and TDS8

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: freetds AT lists.ibiblio.org
  • Cc: freddyz77 AT tin.it
  • Subject: Re: [freetds] collate and TDS8
  • Date: Sun, 8 Dec 2002 10:15:40 -0500

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




Archive powered by MHonArc 2.6.24.

Top of Page