tdbc::odbc

Check-in [2d0ae6f27d]
Login

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

Overview
Comment:More fail-safe handling of unpaired surrogates in combination with TIP #389. Suggested by Kevin Kenny.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2d0ae6f27ded75bb24b6efa6dc2c62a394dfb7de1932a1918ad6df5517fc04d1
User & Date: jan.nijtmans 2018-04-18 08:11:39.472
Context
2018-05-12
16:51
ADVANCE VERSION TO 1.1.0. Integrate Christian Werner's changes to support systems (specifically, iodbc) that use a 32-bit SQLWCHAR, with runtime detection of the character format in use. This change enables the use of tdbc::odbc on BSD-derived systems and Apple platforms, where iodbc is the usual ODBC implementation. check-in: 11581e229b user: kbk tags: trunk
2018-05-07
05:09
Create new branch named "detect-sqlwchar-size" check-in: b577624db4 user: chw tags: detect-sqlwchar-size
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
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tdbcodbc.c.
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
static void
DStringAppendWChars(
    Tcl_DString* ds,		/* Output string */
    SQLWCHAR* ws,		/* Input string */
    int len			/* Length of the input string in characters */
) {
    int i;
    char buf[TCL_UTF_MAX];
    for (i = 0; i < len; ++i) {
	int bytes = Tcl_UniCharToUtf((int) ws[i], buf);
	Tcl_DStringAppend(ds, buf, bytes);
    }
}

/*







|







779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
static void
DStringAppendWChars(
    Tcl_DString* ds,		/* Output string */
    SQLWCHAR* ws,		/* Input string */
    int len			/* Length of the input string in characters */
) {
    int i;
    char buf[4] = "";
    for (i = 0; i < len; ++i) {
	int bytes = Tcl_UniCharToUtf((int) ws[i], buf);
	Tcl_DStringAppend(ds, buf, bytes);
    }
}

/*