summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-21 19:56:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-21 19:56:55 (GMT)
commit9d9c83fd39412503597228bd93052e0abccfce24 (patch)
treefea910e338cbaf49123da4a2063d437fae8c3fd9
parentd8ec6222e8374b744712d5901e829fd92ee43cf0 (diff)
parentf9944f5235de6c83cd1fc611f2abeea2236d5512 (diff)
downloadtcl-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.
-rw-r--r--doc/ToUpper.36
-rw-r--r--generic/tclUtf.c10
2 files changed, 3 insertions, 13 deletions
diff --git a/doc/ToUpper.3 b/doc/ToUpper.3
index 1c7a0c2..fd9ddfb 100644
--- a/doc/ToUpper.3
+++ b/doc/ToUpper.3
@@ -78,11 +78,5 @@ turns each character in the string into its lower-case equivalent.
turns the first character in the string into its title-case equivalent
and all following characters into their lower-case equivalents.
-.SH BUGS
-.PP
-At this time, the case conversions are only defined for the ISO8859-1
-characters. Unicode characters above 0x00ff are not modified by these
-routines.
-
.SH KEYWORDS
utf, unicode, toupper, tolower, totitle, case
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++);
}