summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-30 08:49:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-30 08:49:18 (GMT)
commit07603e3b381387670e03489d397205372589c336 (patch)
tree65eee861d510dc0d9cb7916edd9792ec363c944f /library
parent092b62fc6bc9cb55ef045a8532fe211acf9f8ec1 (diff)
parent471313fea05798b7d188c6f69266b319236abef1 (diff)
downloadtcl-07603e3b381387670e03489d397205372589c336.zip
tcl-07603e3b381387670e03489d397205372589c336.tar.gz
tcl-07603e3b381387670e03489d397205372589c336.tar.bz2
Merge 8.7. Remove "string bytelength" completely. Also fix some TIP #595 leftover testcases, which were skipped
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/init.tcl b/library/init.tcl
index dbfaaa7..ece3591 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -214,9 +214,9 @@ proc unknown args {
set errInfo [dict get $opts -errorinfo]
set errCode [dict get $opts -errorcode]
set cinfo $args
- if {[string bytelength $cinfo] > 150} {
+ if {[string length [encoding convertto utf-8 $cinfo]] > 150} {
set cinfo [string range $cinfo 0 150]
- while {[string bytelength $cinfo] > 150} {
+ while {[string length [encoding convertto utf-8 $cinfo]] > 150} {
set cinfo [string range $cinfo 0 end-1]
}
append cinfo ...