diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2019-11-10 04:34:01 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2020-01-12 00:20:37 +0300 |
commit | b0f5bce10dcc05198e2e58ee08e1cc3dcd3d1aea (patch) | |
tree | 0b7ec82ff489cc23451e816121cf466d65ba78d5 /tcl_tests/calcstat | |
parent | 3b8ddfe2f303b8931842e52bdb5c07c97042f651 (diff) | |
download | gost-engine-b0f5bce10dcc05198e2e58ee08e1cc3dcd3d1aea.zip gost-engine-b0f5bce10dcc05198e2e58ee08e1cc3dcd3d1aea.tar.gz gost-engine-b0f5bce10dcc05198e2e58ee08e1cc3dcd3d1aea.tar.bz2 |
tcl_tests: Make utf-8 encoding work
- Remove emacs coding: cp1251 tag
- Change stats file encoding to utf-8
- Change packages source to have -encoding utf-8
- Run tclsh with -encoding utf-8
- Make `proc rus' noop.
This will make Tcl automatically translate scripts output from utf-8 to
system encoding.
Diffstat (limited to 'tcl_tests/calcstat')
-rw-r--r-- | tcl_tests/calcstat | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tcl_tests/calcstat b/tcl_tests/calcstat index 3e59eb6..c2a19da 100644 --- a/tcl_tests/calcstat +++ b/tcl_tests/calcstat @@ -4,7 +4,7 @@ if {$tcl_platform(platform) == "unix"} { } lappend auto_path [file dirname [info script]] proc rus {string} { - return [encoding convertfrom cp1251 [encoding convertto $string]] + return $string } proc compare_order {el1 el2} { global order @@ -13,7 +13,7 @@ proc compare_order {el1 el2} { set statsfile stats if {$argc} {set statsfile [lindex $argv 0]} set f [open $statsfile] -fconfigure $f -encoding cp1251 +fconfigure $f -encoding utf-8 set ordno 0 while {[gets $f line] >=0} { set script [lindex $line 0] @@ -34,7 +34,7 @@ proc output {line} { if {$argc > 1} { set out [open [lindex $argv 1] w] - fconfigure $out -encoding cp1251 + fconfigure $out -encoding utf-8 } output [format "%-12s %-41s%5s %4s %4s %4s %4s" File "Test name" Total ok fail skip ign] |