#3786 Tk console may render tab in a string as a space

obsolete: 8.5a6
closed-invalid
nobody
None
5
2007-09-12
2007-09-12
No

Windows XP; Seen in 8.5a6 and 8.5a5, but not in 8.5a2 or 8.4.15:

Tk Console may render a string containing tab characters with a space, although a multi-space gap corresponding to a tab was expected. What is rendered seems to depend on the preceding string length.

Tab separators are in the data, as indicated by inspecting with Notepad a plain text file of strings generated with tabs, and an Excel spreadsheet, into which the copied console output was pasted.

Test case:
# assume tab is equivalent to 8 spaces
set x "abcdefgh 1\t2"
set x "abcdefgh\t1\t2"

in 8.4.15 (ActiveState) and 8.5a2 (AlphaTk 8.4a1):
abcdefgh 1 2
abcdefgh 1 2

in 8.5a5 and 8.5a6:
abcdefgh 1 2
abcdefgh 1 2

Discussion

  • Donal K. Fellows

    Logged In: YES
    user_id=79902
    Originator: NO

    Ah, this is a wordprocessor-style vs. typewriter-style tabs problem. See http://tip.tcl.tk/256.html for a discussion.

    Not a Tcl bug at all BTW.

     
  • Donal K. Fellows

    • status: open --> closed-invalid