Diff

Differences From Artifact [877050aa4b]:

To Artifact [5e7b5c786a]:


    86     86   		} else {
    87     87   			encoding dirs [list [file join [info library] encoding]] ;# TIP 258
    88     88   		}
    89     89   
    90     90   		# fix system encoding, if it wasn't properly set up (200207.004 bug)
    91     91   		if {[encoding system] eq "identity"} {
    92     92   			if {[info exists ::tclkit_system_encoding] && $::tclkit_system_encoding != ""} {
    93         -				encoding system $::tclkit_system_encoding
    94         -			} else {
    95         -				switch $::tcl_platform(platform) {
    96         -					windows		{ encoding system cp1252 }
    97         -					macintosh	{ encoding system macRoman }
    98         -				        default		{ encoding system iso8859-1 }
           93  +				catch {
           94  +					encoding system $::tclkit_system_encoding
    99     95   				}
   100     96   			}
   101         -
   102     97   			unset -nocomplain ::tclkit_system_encoding
   103     98   		}
           99  +
          100  +		# If we've still not been able to set the encoding, revert to Tclkit defaults
          101  +		if {[encoding system] eq "identity"} {
          102  +			switch $::tcl_platform(platform) {
          103  +				windows		{ encoding system cp1252 }
          104  +				macintosh	{ encoding system macRoman }
          105  +			        default		{ encoding system iso8859-1 }
          106  +			}
          107  +		}
   104    108   
   105    109   		# now remount the executable with the correct encoding
   106    110   		vfs::filesystem unmount [lindex [::vfs::filesystem info] 0]
   107    111   
   108    112   		set noe [info nameofexecutable]
   109    113   
   110    114   		# Resolve symlinks