summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-02-21 10:22:57 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-02-21 10:22:57 (GMT)
commit4e9a61da4ebdae3218ba32738cc6422743a9ae33 (patch)
tree122376f0f97d209210f64a27d8a4fbb3c0324b17 /library
parent025768e70f99fabd95951aeba08eacf06a075cf3 (diff)
downloadtk-4e9a61da4ebdae3218ba32738cc6422743a9ae33.zip
tk-4e9a61da4ebdae3218ba32738cc6422743a9ae33.tar.gz
tk-4e9a61da4ebdae3218ba32738cc6422743a9ae33.tar.bz2
[Bug 2546087] Restore support for NULs in console stdout channel.
In 2004 a fix to Tcl channels prevented the exposure of the internal UTF-8 representation of the ASCII NUL character (\uc080). Since then strings in the console have been truncated at NUL. This restores the older behaviour.
Diffstat (limited to 'library')
-rw-r--r--library/console.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/console.tcl b/library/console.tcl
index 7f39ec3..2f009f0 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.40 2009/01/30 21:02:13 patthoyts Exp $
+# RCS: @(#) $Id: console.tcl,v 1.41 2009/02/21 10:22:58 patthoyts Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -663,7 +663,7 @@ proc ::tk::ConsoleInsert {w s} {
proc ::tk::ConsoleOutput {dest string} {
set w .console
- $w insert output $string $dest
+ $w insert output [string map {\0 \u25a1} $string] $dest
::tk::console::ConstrainBuffer $w $::tk::console::maxLines
$w see insert
}