Skip to content
Tcl Source Code History Of Ticket e3da32d8169e7584
Login

History Of Ticket e3da32d8169e7584

Artifacts Associated With Ticket e3da32d8169e7584

  1. Ticket change [85fb63ca24] (rid 141593) by anonymous on 2015-04-21 05:03:23:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      On the mac, a [glob] will return the decomposed utf-8 form of the filename.
      glob should convert the filenames to the standard utf-8 format.
      An encoding to convert these might also be useful.
      
      #!/opt/local/bin/tclsh
      #
      # references
      #     http://stackoverflow.com/questions/6153345/different-utf8-encoding-in-filenames-os-x
      #     https://developer.apple.com/library/mac/qa/qa1173/_index.html
      
      set orig {aĆ”}
      set fh [open $orig w]
      close $fh
      set fnlist [glob -nocomplain a*]
      foreach {fn} $fnlist {
        if { ! [regexp {^a} $fn] } {
          continue
        }
        puts "orig:$orig"
        puts "  fn:$fn"
        if { $orig == $fn } {
          puts "  equal"
        } else {
          puts "  not equal"
        }
      }
      
    5. foundin initialized to: "8.6.3"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "e755306c9ef019bc4ca35d69adcf001dece786ff"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "44. UTF-8 Strings"
    15. title initialized to: "max os x [glob] returns the decomposed filenames"
    16. type initialized to: "Bug"
  2. Ticket change [88b34a4b80] (rid 141794) by dkf on 2015-05-16 06:01:10:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      This is exactly why we need to put encoding normalization into Tcl as part of the unicode fixes. That's a lot of code, unfortunately. But we'll probably leave <tt>glob</tt> doing what it does now, since it's just telling you what is there, and will work correctly for the main use case of getting filenames so that you can use them with file-manipulating operations.
      
    3. login: "dkf"
    4. mimetype: "text/html"
    5. priority changed to: "4"
    6. username: "dkf"
  3. Ticket change [1204e76c36] (rid 141927) by anonymous on 2015-05-25 21:23:50:

    1. icomment:
      This bug has been extant since 2003 ( http://sourceforge.net/p/tcl/bugs/2501/ ).
      
      I guess I'm not in the main use case :), though I certainly agree -- most of the time, if the user is just dealing with files, it's not an issue.
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "[email protected]"
  4. Ticket change [f16f9ab227] (rid 141956) by anonymous on 2015-05-31 08:33:30:

    1. icomment:
      Here is the work around in case anyone else looks for this issue.
        set flist [glob *]
        set fn gfl.txt
        set fh [open $fn w]
        puts $fh $flist
        close $fh
        set flist [exec iconv -f UTF-8-MAC -t UTF-8 $fn]
        file delete $fn
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "[email protected]"