summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-09 15:19:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-09 15:19:51 (GMT)
commitaa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49 (patch)
tree3437f219dfea47d335f00237bd046b9a809c3a7f /library
parent1f4a8eb5d1a8d6fddf8571fc5694d3b527799df6 (diff)
downloadtcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.zip
tcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.tar.gz
tcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.tar.bz2
Deprecate/remove "string bytelength"
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 c9bfff6..749eed9 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 wtf-8 $cinfo]] > 150} {
set cinfo [string range $cinfo 0 150]
- while {[string bytelength $cinfo] > 150} {
+ while {[string length [encoding convertto wtf-8 $cinfo]] > 150} {
set cinfo [string range $cinfo 0 end-1]
}
append cinfo ...