summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index f5ae07a..8085955 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -580,9 +580,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++);
@@ -634,10 +632,8 @@ Tcl_UtfToUtf16DString(
}
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 += Tcl_UtfToUtf16(p, &ch);
} else {
ch = UCHAR(*p++);
}