[unixODBC-support] Length semantics

Nick Gorham nick.gorham at easysoft.com
Wed May 10 09:18:13 BST 2006

Vivekanand wrote:

>  There are odbc apis which have character i/o parameters. These arguments have length parameters associated with them. These lengths can be number of bytes or number of wide characters/code points (utf16/32). I want to know about these length semantics. I could not find any relevant documentation. It would be fine if somebody points me to such a reference.
>  Thanks and regards,
>  Vivek.


"Unicode functions that always return or take strings or length 
arguments are passed as count-of-characters. For functions that return 
length information for server data, the display size and precision are 
described in number of characters. When a length (transfer size of the 
data) could refer to string or nonstring data, the length is described 
in octet lengths. For example, *SQLGetInfoW* will still take the length 
as count-of-bytes, but *SQLExecDirectW* will use count-of-characters."

Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org

More information about the unixODBC-support mailing list