Re: UNICODE support

Nick Gorham <[email protected]> Mon, 28 Mar 2016 16:51:41 +0100
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <[email protected]>
On 28/03/16 15:57, Igor Korot wrote:
> Nick,
>
>
> OK, so basically what you are saying is: "Its not possible to write a portable
> code which uses MS ODBC manager and unixODBC".
> Because looking at my code, it looks like _WCHAR_T_DEFINED is defined. ;-)
Yes, its perfectly possible, I do it all the time, use SQLWCHAR [], 
expect it to be a two or more byte size array value, and treat as such. 
What you cant do is expect the standard library to understand it.
>
> It would be nice if the Development manual was updated with this info.
>
>> Now on  related note, char = %c char* = %s, is it not?
>> Granted I didn't use plain C for a long time, but I think here I'm right.
>> ;-)
>>
>>
>> Yes, I was assuming a shorthand, where %s is char array, I assumed you would
>> know the array part. But the important part of that is that its char, not
>> long, short or int.
> Yes, but "char *" is just a dynamically allocated array of characters.

Well, its not, its a pointer to a character, not an array, nothing about 
dynamic. But whatever, you cant expect %s in printf to understand 
anything but characters. (or multiple char sequences if using UTF8).

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev