diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-21 19:56:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-21 19:56:55 (GMT) |
commit | 9d9c83fd39412503597228bd93052e0abccfce24 (patch) | |
tree | fea910e338cbaf49123da4a2063d437fae8c3fd9 /generic/tclUtf.c | |
parent | d8ec6222e8374b744712d5901e829fd92ee43cf0 (diff) | |
parent | f9944f5235de6c83cd1fc611f2abeea2236d5512 (diff) | |
download | tcl-9d9c83fd39412503597228bd93052e0abccfce24.zip tcl-9d9c83fd39412503597228bd93052e0abccfce24.tar.gz tcl-9d9c83fd39412503597228bd93052e0abccfce24.tar.bz2 |
Remove incorrect comment.
Simplify handling of last bytes in Tcl_UniCharToUtfDString(), since TclUtfToUniChar() already turns out to handle cp1252 fall-back correctly.
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r-- | generic/tclUtf.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c index a330d11..1876672 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -619,9 +619,7 @@ Tcl_UtfToUniCharDString( } end += 4; while (p < end) { - if (((unsigned)(UCHAR(*p)-0x80)) < 0x20) { - ch = cp1252[UCHAR(*p++)-0x80]; - } else if (Tcl_UtfCharComplete(p, end-p)) { + if (Tcl_UtfCharComplete(p, end-p)) { p += TclUtfToUniChar(p, &ch); } else { ch = UCHAR(*p++); @@ -673,10 +671,8 @@ TclUtfToWCharDString( } 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); + if (Tcl_UtfCharComplete(p, end-p)) { + p += TclUtfToWChar(p, &ch); } else { ch = UCHAR(*p++); } |