tdbc::odbc

Check-in [584efa4a8e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make tdbcodbc TIP #389 compatible.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 584efa4a8e0e24a71c63cea3b66af005a2ed550c28346278d7a3c020e76f62ff
User & Date: jan.nijtmans 2018-04-17 10:54:43.592
Context
2018-04-18
08:11
More fail-safe handling of unpaired surrogates in combination with TIP #389. Suggested by Kevin Kenny. check-in: 2d0ae6f27d user: jan.nijtmans tags: trunk
2018-04-17
10:54
Make tdbcodbc TIP #389 compatible. check-in: 584efa4a8e user: jan.nijtmans tags: trunk
2018-01-05
06:53
Merge stu-pkgIndex. Companion to https://core.tcl.tk/tdbc/info/2386d26cfb8a34c3. check-in: 4027aab6ca user: stu tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tdbcodbc.c.
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
    int len = Tcl_GetCharLength(obj);
				/* Length of the input string in characters */
    SQLWCHAR* retval = (SQLWCHAR*) ckalloc((len + 1) * sizeof(SQLWCHAR));
				/* Buffer to hold the converted string */
    char* bytes = Tcl_GetString(obj);
				/* UTF-8 representation of the input string */
    int i;
    Tcl_UniChar ch;

    for (i = 0; i < len; ++i) {
	bytes += Tcl_UtfToUniChar(bytes, &ch);
	retval[i] = ch;
    }
    retval[i] = 0;
    if (lengthPtr != NULL) {







|







816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
    int len = Tcl_GetCharLength(obj);
				/* Length of the input string in characters */
    SQLWCHAR* retval = (SQLWCHAR*) ckalloc((len + 1) * sizeof(SQLWCHAR));
				/* Buffer to hold the converted string */
    char* bytes = Tcl_GetString(obj);
				/* UTF-8 representation of the input string */
    int i;
    Tcl_UniChar ch = 0;

    for (i = 0; i < len; ++i) {
	bytes += Tcl_UtfToUniChar(bytes, &ch);
	retval[i] = ch;
    }
    retval[i] = 0;
    if (lengthPtr != NULL) {