Overview
| Artifact ID: | 823bd9c92820a6a04733fcf00355ec00519e08fe |
|---|---|
| Ticket: | 79614fb8b61983ac8ef30ea8752c310465798fc7
[glob], [encoding system] and encoding-free filesystems |
| User & Date: | pooryorick on 2016-11-07 23:03:09 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
in the following example, on a Linux system, where filesystems are encoding-free, the file is only opened when the Tcl system encoding is iso8859-1. Furthermore, when the line <code><verbatim>set name $directory/[lindex $names 0]</verbatim></code> is moved out of the loop, the file is not successfully opened at all. <code><verbatim> set sysencoding_orig [encoding system] set name0 "funky \xa2 name" # Set up for the demonstration of the bug by creating a file whose name is # exactly the bytes in the string below close [open $name0 wb] set directory [pwd] set names [glob -directory $directory -tails *] foreach encoding [list $sysencoding_orig iso8859-1] { encoding system $encoding set name $directory/[lindex $names 0] puts [list {globbed name identical?} [expr {$name0 eq $name}]] try { set chan [open $name] encoding system $sysencoding_orig puts [list {opened with system encoding} $encoding] close $chan } on error {cres copts} { puts [list {failed to open with system encoding} $encoding] } } encoding system $sysencoding_orig </verbatim></code> - foundin changed to: "8.6.7"
- is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "16. Commands A-H"
- title changed to:
[glob], [encoding system] and encoding-free filesystems
- type changed to: "Bug"