Index: openacs-4/packages/acs-templating/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/element-procs.tcl,v diff -u -r1.39 -r1.40 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 11 Sep 2024 06:15:48 -0000 1.39 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 1 Oct 2024 12:44:32 -0000 1.40 @@ -692,7 +692,12 @@ # A maximum length was specified for this element. Make # sure it is respected first. # - set value_bytelength [string bytelength $value] + + # Tcl9 does not include "string bytelength". Use idiom + # from Rolf Ade's Tcl9 migration guide instead. + #set value_bytelength [string bytelength $value] + set value_bytelength [string length [encoding convertto utf-8 $value]] + if { $value_bytelength > $element(maxlength) } { # # The element is too long.