Index: openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl,v diff -u -r1.27.2.11 -r1.27.2.12 --- openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl 7 Sep 2021 17:51:10 -0000 1.27.2.11 +++ openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl 28 Jan 2022 22:44:17 -0000 1.27.2.12 @@ -27,19 +27,28 @@ set :__orderby $variable } - OrderedComposite instproc __compare {a b} { - set by ${:__orderby} - set x [$a set $by] - set y [$b set $by] - if {$x < $y} { - return -1 - } elseif {$x > $y} { - return 1 - } else { - return 0 + if {[::acs::icanuse "ns_strcoll"]} { + OrderedComposite instproc __compare {a b} { + set by ${:__orderby} + set x [$a set $by] + set y [$b set $by] + return [ns_strcoll $x $y] } + } else { + OrderedComposite instproc __compare {a b} { + set by ${:__orderby} + set x [$a set $by] + set y [$b set $by] + if {$x < $y} { + return -1 + } elseif {$x > $y} { + return 1 + } else { + return 0 + } + } } - + OrderedComposite instproc children {} { if {![info exists :__children]} { return ""