summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
Commit message (Collapse)AuthorAgeFilesLines
* merge 8.7dkf2019-04-191-4/+4
|\
| * Replace memcpy() calls with memmove() to avoid undefined behavior whendgp2019-04-171-4/+4
| | | | | | source and destination overlap.
* | Merge 8.7jan.nijtmans2019-03-241-3/+1
|\ \ | |/
| * Since only bytes 0xF0 - 0xF4 can be the first byte of a valid 4-byte UTF-8 ↵jan.nijtmans2019-03-241-3/+1
| |\ | | | | | | | | | byte sequence, account for that in Tcl_UtfCharComplete().
| | * Since only bytes 0xF0 - 0xF4 can be the first byte of a valid 4-byte UTF-8 ↵jan.nijtmans2019-03-241-3/+3
| | |\ | | | | | | | | | | | | byte sequence, account for that in Tcl_UtfCharComplete(). Only effective when TCL_UTF_MAX>3
| | | * Since only bytes 0xF0 - 0xF4 can be the first byte of a valid 4-byte UTF-8 ↵jan.nijtmans2019-03-241-3/+3
| | | | | | | | | | | | | | | | byte sequence, account for that in Tcl_UtfCharComplete(). Only effective when TCL_UTF_MAX>3
| | | * Backport various minor issues from 8.6: jan.nijtmans2018-10-271-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | - gcc compiler warning in tclDate.c - protect Tcl_UtfToUniCharDString() from ever reading more than "length" bytes from its input, not even in the case of invalid UTF-8. - update to latest tzdata - fix 2 failing test-cases on MacOSX
* | | | Merge 8.7jan.nijtmans2019-03-211-7/+3
|\ \ \ \ | |/ / /
| * | | Remove incorrect comment. jan.nijtmans2019-03-211-7/+3
| |\ \ \ | | |/ / | | | | Simplify handling of last bytes in Tcl_UniCharToUtfDString(), since TclUtfToUniChar() already turns out to handle cp1252 fall-back correctly.
* | | | Merge 8.7jan.nijtmans2019-03-201-7/+7
|\ \ \ \ | |/ / /
| * | | Fix Tcl_UtfToUniCharDString() function, handling invalid byte at the end of ↵jan.nijtmans2019-03-201-7/+7
| | | | | | | | | | | | | | | | the string: Not quite correct for bytes between 0x80-0x9F, according to TIP
* | | | Merge 8.7jan.nijtmans2019-03-181-1/+1
|\ \ \ \ | |/ / /
| * | | Comment Comment Tcl_UniCharToUtf() better, what happens handling surrogates. ↵jan.nijtmans2019-03-181-1/+1
| | | | | | | | | | | | | | | | Add type cast in tclUtf.c, making actual check clearer
* | | | Merge 8.7jan.nijtmans2019-03-101-2/+202
|\ \ \ \ | |/ / /
| * | | re-implemente changes in win/tclWinFile.c (handling -DTCL_UTF_MAX=6) using 3 ↵jan.nijtmans2019-03-101-2/+202
| | | | | | | | | | | | | | | | new utility functions. This allows to re-use code in more places: cleaner implementation more future-proof.
* | | | Merge 8.7jan.nijtmans2019-03-081-6/+6
|\ \ \ \ | |/ / /
| * | | Fixes for TCL_UTF_MAX=6, (gcc compiler warnings). Also make everything work ↵jan.nijtmans2019-03-071-6/+6
| | | | | | | | | | | | | | | | on win32/win64. Patch adapted from Androwish (thanks, Werner!)
* | | | merge 8.7 (TIP#527, New measurement facilities in TCL: New command timerate, ↵sebres2019-03-051-2/+2
|\ \ \ \ | |/ / / | | | | | | | | performance test suite)
| * | | Add build with -DTCL_UTF_MAX=6 to travis CI. Also fix 2 gcc ↵jan.nijtmans2019-03-021-2/+2
| | | | | | | | | | | | | | | | compiler-warnings occurring with -DTCL_UTF_MAX=6
* | | | Merge 8.7jan.nijtmans2019-03-021-3/+16
|\ \ \ \ | |/ / /
| * | | Minor optimization in UTF-8 handling, and add some comments describing how ↵jan.nijtmans2019-03-021-3/+16
| |\ \ \ | | |/ / | | | | | | | | Tcl_UniCharToUtf() handles surrogates.
| | * | Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 ↵jan.nijtmans2019-03-021-66/+75
| | | | | | | | | | | | | | | | conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish.
* | | | merge 8.7dgp2019-03-011-1/+1
|\ \ \ \ | |/ / /
| * | | A confusion about signed vs unsigned comparision caused Tcl_UtfToUniChar()dgp2019-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | to return the wrong answer (contents of random memory) for each single byte UTF-8 in the input. This commit fixes that bug. More commentary on https://core.tcl-lang.org/tcl/tktview/bd94500678
* | | | Merge 8.7jan.nijtmans2019-02-271-87/+95
|\ \ \ \ | |/ / /
| * | | Finish complete fix, all corner-cases correct now. Also spurious UTF-8 ↵jan.nijtmans2019-02-251-18/+20
| | | | | | | | | | | | | | | | testcase failure (as seen on travis) fixed now.
| * | | Minor optimizationsjan.nijtmans2019-02-191-55/+58
| | | |
| * | | Proposed fix for [bd94500678]: SEGFAULT by conversion of unicode (out of ↵jan.nijtmans2019-02-181-36/+39
| | | | | | | | | | | | | | | | BMP) to byte-array.
* | | | Merge 8.7jan.nijtmans2019-02-191-3/+3
|\ \ \ \
| * \ \ \ Merge 8.6jan.nijtmans2019-02-191-3/+3
| |\ \ \ \ | | |/ / / | |/| / / | | |/ /
* | | | More size_t-related consolidations. Now regexp can handle strings >2GB and ↵jan.nijtmans2019-02-051-13/+15
| | | | | | | | | | | | | | | | more. Remove many type-casts which are not necessary any more.
* | | | TIP #494 implementation: More use of size_t in Tcl 9jan.nijtmans2018-10-081-36/+43
|\ \ \ \ | |/ / / |/| | |
| * | | Use more TCL_AUTO_LENGTH, when appropriatejan.nijtmans2018-10-061-3/+3
| | | |
| * | | merge trunkjan.nijtmans2018-10-041-6/+18
| |\ \ \
| * \ \ \ Merge trunkjan.nijtmans2018-07-051-6/+5
| |\ \ \ \ | | | | | | | | | | | | Handle TclCopyAndCollapse, *Trace* et al
| * | | | | More API changes using size_t. Internal changes not complete yet (WIP)jan.nijtmans2018-06-281-2/+2
| | | | | |
| * | | | | merge trunkjan.nijtmans2018-06-271-5/+22
| |\ \ \ \ \ | | |/ / / /
| * | | | | merge trunkjan.nijtmans2018-05-251-0/+6
| |\ \ \ \ \
| * \ \ \ \ \ merge trunkjan.nijtmans2018-05-231-95/+146
| |\ \ \ \ \ \ | | |/ / / / /
| * | | | | | Change Tcl_Token definition (int -> size_t). Many related code-changes.jan.nijtmans2018-01-311-1/+1
| | | | | | |
| * | | | | | merge trunkjan.nijtmans2018-01-291-10/+14
| |\ \ \ \ \ \
| * \ \ \ \ \ \ merge trunkjan.nijtmans2017-12-011-19/+111
| |\ \ \ \ \ \ \
| * | | | | | | | Handle Tcl_UtfAtIndex/Tcl_UniCharAtIndex for extended index range. More ↵jan.nijtmans2017-11-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | field fixes.
| * | | | | | | | merge novemjan.nijtmans2017-09-101-20/+52
| |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge trunkjan.nijtmans2017-08-291-25/+53
| | |\ \ \ \ \ \ \ \
| * | \ \ \ \ \ \ \ \ merge novemjan.nijtmans2017-06-091-46/+48
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / /
| | * | | | | | | | | merge trunkjan.nijtmans2017-06-081-13/+14
| | |\ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ merge trunkjan.nijtmans2017-06-061-18/+24
| | |\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / /
| * | | | | | | | | | | merge trunkjan.nijtmans2016-08-301-44/+24
| |\ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ merge trunkdgp2016-04-051-14/+8
| |\ \ \ \ \ \ \ \ \ \ \ \