[freetds] TDS_ICONV_INFO_ENTRY

Lowden, James K LowdenJK at bernstein.com
Tue Jun 10 14:53:44 EDT 2003


> From: Isak Johnsson [mailto:isak at hypergene.com]
> Sent: June 10, 2003 2:00 PM
> 
> I'm new here, so please excuse me if I'm missing something.

Hej Isak.  

> It seems that this symbol is defined on line 882 of tds.h:
> enum { client2ucs2, client2server_singlebyte, ascii2server_metadata } 
> TDS_ICONV_INFO_ENTRY;

My bad.  

> As far as I know C this is a variable declaration so each file that 
> includes tds.h will have their own variable.

Quite right.  

> How is it used, as a global variable or as a type? 

It's meant to be a type.  So far, the enumerations are used, but the type is
not.  I don't have any specific use in mind for the type, either.  

> wouldn't this be the correct line?
> enum TDS_ICONV_INFO_ENTRY { client2ucs2, client2server_singlebyte, 
> ascii2server_metadata };

That's right.  Thanks for finding my bug!  

I often see "typedef enum {something} MY_TYPE;" too.  I think there's some
subtle difference between C++ and C (or some C compilers) that makes
typedefs more portable?  But your version is what I would have done if my
linker had complained.  

BTW, you're not alone on OS X.  Another fellow is working on an iconv
emulation built on OS X's character set features.  It's his intention to be
able to use FreeTDS on OS X without Gnu iconv.  One of our goals is to
support the Mac's UCS-2 character set, but I don't expect that to happen
this year.  Are you using FreeTDS with ISO-8859-15?  

Har det så bra.  

--jkl


-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.





More information about the FreeTDS mailing list