freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT umcc.ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Possible endian issue
- Date: Fri, 24 Sep 1999 18:37:18 -0400 (EDT)
Hi Kevin,
Actually since this code only works under TDS 7.0 and thus MS SQL 7.0,
there are no endian issues. Microsoft has apparently decided everything
is little endian.
Brian
On Sat, 25 Sep 1999, Kevin Lyons wrote:
> Hey all, just goin' through the code from 0.47 and noticed something
> that might
> be an issue on the tds7_ascii2unicode function...correct me if I'm wrong
> (it's been known
> to happen quite a bit), but isn't the code only performing the
> translation for little
> endianess, not big? Shouldn't it be something more like...
>
> char* tds7_ascii2unicode(const char *in_string, char *out_string, int
> maxlen) {
> int out_pos = 0;
> int i;
>
> for(i=0; in_string[i]; i++) {
> #if defined(HW_LITTLE_ENDIAN)
> out_string[out_pos++]=in_string[i];
> out_string[out_pos++]='\0';
> #elif defined(HW_BIG_ENDIAN)
> out_string[out_pos++]='\0';
> out_string[out_pos++]=in_string[i];
> #else
> #error Endianess not defined!
> #endif
> }
> return out_string;
> }
>
>
> --
> "To understand the mathmatics concept of infinity, one must only explore
> the
> depths of human stupidity" -- Voltaire
>
> Kevin Lyons Programmer Nebrask@ Online Phone: 471-7870
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>
-
Possible endian issue,
Kevin Lyons, 09/24/1999
- <Possible follow-up(s)>
- Re: Possible endian issue, Brian Bruns, 09/24/1999
- Re: Possible endian issue, Kevin Lyons, 09/26/1999
Archive powered by MHonArc 2.6.24.