Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 85fb63ca2453dc9ae91eac1d478c28248bb6fae4
Ticket: e3da32d8169e7584f93dea8592f1f5b9a37f0413
max os x [glob] returns the decomposed filenames
User & Date: anonymous on 2015-04-21 05:03:23
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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 changed to: "8.6.3"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "e755306c9ef019bc4ca35d69adcf001dece786ff"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "44. UTF-8 Strings"
  15. title changed to: "max os x [glob] returns the decomposed filenames"
  16. type changed to: "Bug"