Tcl Source Code

Check-in [bb9b52ab82]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Merge 8.7
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bb9b52ab82d48e8723b604fea7d0848e9062207c5df75e78b70aedce311f442b
User & Date: jan.nijtmans 2019-03-20 22:51:17
Context
2019-03-21
20:11
Merge 8.7 check-in: 871076a655 user: jan.nijtmans tags: trunk
2019-03-20
22:51
Merge 8.7 check-in: bb9b52ab82 user: jan.nijtmans tags: trunk
22:45
Fix Tcl_UtfToUniCharDString() function, handling invalid byte at the end of the string: Not quite co... check-in: 3e8ada19f5 user: jan.nijtmans tags: core-8-branch
2019-03-18
22:34
Merge 8.7 check-in: 48c676b649 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclUtf.c.

450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
...
616
617
618
619
620
621
622


623
624
625
626
627
628
629
630
631
632
633
...
670
671
672
673
674
675
676


677
678
679
680
681
682
683
684
685
686
687
	    if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
		return 4;
	    }
#endif
	}

	/*
	 * A four-byte-character lead-byte not followed by two trail-bytes
	 * represents itself.
	 */
    }

    *chPtr = byte;
    return 1;
}
................................................................................
    end = src + length - 4;
    while (p < end) {
	p += TclUtfToUniChar(p, &ch);
	*w++ = ch;
    }
    end += 4;
    while (p < end) {


	if (Tcl_UtfCharComplete(p, end-p)) {
	    p += TclUtfToUniChar(p, &ch);
	} else if (((UCHAR(*p)-0x80)) < 0x20) {
	    ch = cp1252[UCHAR(*p++)-0x80];
	} else {
	    ch = UCHAR(*p++);
	}
	*w++ = ch;
    }
    *w = '\0';
    Tcl_DStringSetLength(dsPtr,
................................................................................
    end = src + length - 4;
    while (p < end) {
	p += TclUtfToWChar(p, &ch);
	*w++ = ch;
    }
    end += 4;
    while (p < end) {


	if (Tcl_UtfCharComplete(p, end-p)) {
	    p += TclUtfToWChar(p, &ch);
	} else if (((UCHAR(*p)-0x80)) < 0x20) {
	    ch = cp1252[UCHAR(*p++)-0x80];
	} else {
	    ch = UCHAR(*p++);
	}
	*w++ = ch;
    }
    *w = '\0';
    Tcl_DStringSetLength(dsPtr,






|







 







>
>
|

<
<







 







>
>
|
|
<
<







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
...
616
617
618
619
620
621
622
623
624
625
626


627
628
629
630
631
632
633
...
670
671
672
673
674
675
676
677
678
679
680


681
682
683
684
685
686
687
	    if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
		return 4;
	    }
#endif
	}

	/*
	 * A four-byte-character lead-byte not followed by three trail-bytes
	 * represents itself.
	 */
    }

    *chPtr = byte;
    return 1;
}
................................................................................
    end = src + length - 4;
    while (p < end) {
	p += TclUtfToUniChar(p, &ch);
	*w++ = ch;
    }
    end += 4;
    while (p < end) {
	if (((unsigned)(UCHAR(*p)-0x80)) < 0x20) {
	    ch = cp1252[UCHAR(*p++)-0x80];
	} else if (Tcl_UtfCharComplete(p, end-p)) {
	    p += TclUtfToUniChar(p, &ch);


	} else {
	    ch = UCHAR(*p++);
	}
	*w++ = ch;
    }
    *w = '\0';
    Tcl_DStringSetLength(dsPtr,
................................................................................
    end = src + length - 4;
    while (p < end) {
	p += TclUtfToWChar(p, &ch);
	*w++ = ch;
    }
    end += 4;
    while (p < end) {
	if (((unsigned)(UCHAR(*p)-0x80)) < 0x20) {
	    ch = cp1252[UCHAR(*p++)-0x80];
	} else if (Tcl_UtfCharComplete(p, end-p)) {
		    p += TclUtfToWChar(p, &ch);


	} else {
	    ch = UCHAR(*p++);
	}
	*w++ = ch;
    }
    *w = '\0';
    Tcl_DStringSetLength(dsPtr,