Skip to content
Tcl Source Code History Of Ticket 463190ffffffffff
Login

History Of Ticket 463190ffffffffff

Artifacts Associated With Ticket 463190ffffffffff

  1. Ticket change [e755e55d64] (rid 104439) by vincentdarley on 2001-09-20 13:36:34:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When looking for encodings, Tcl searches along the 
      paths returned by TclGetLibraryPath(), which is stored 
      in the C variable 'tclLibraryPathStr'.  If an 
      application, extension or script wishes to augment the 
      native set of encodings with some new encodings, Tcl 
      provides no public way to achieve that.  The only 
      access to this value is through:
      
      "tclInt.h"
      TclGetLibraryPath()
      TclSetLibraryPath()
      
      "in scripts"
      $tcl_libPath  (but this is effectively read-only, 
      since any changes to the variable have no effect on 
      the C variable tclLibraryPathStr nor on the encoding 
      search path).
      
      A public way of either setting this search path or 
      directly adding encodings should be provided in Tcl (I 
      would lean towards the former).
      
      I don't have a concrete proposal to make, since I'm 
      not very familiar with this code, but it does seem 
      like if my script wants to use its own new encoding, 
      it ought to be able to do that without having to add 
      the encoding to a pre-existing directory on 
      $tcl_libPath (to which it might not have write access).
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vincentdarley"
    9. subsystem initialized to: "38. Init - Library - Autoload"
    10. title initialized to: "no public way to set encoding search"
    11. type initialized to: "Bug"
  2. Ticket change [d237097976] (rid 113492) by dgp on 2001-09-20 21:29:14:

    1. assignee changed to: "nobody"
    2. foundin changed to: "None"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      Moved to "Feature Requests".
      
      I think this functionality could be provided by
      a package making appropriate use of Tcl_CreateEncoding(),
      right?  If so, I think some prototyping as a package
      would be in order to work out the kinks before
      modifying Tcl itself.  If the package is good enough,
      modifying Tcl itself may not even be necessary.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. subsystem changed to: "None"
    7. username: "dgp"
  3. Ticket change [ab19d551e2] (rid 101036) by dgp on 2001-09-20 21:39:01:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      OK, after reading Tcl_GetEncoding(3), my prior comment
      might have slightly missed the mark.  The request here
      is not for access to create a new encoding, which is
      already provided by Tcl_CreateEncoding.
      
      Instead it is access to influence the search path of
      the dynamic loading of encoding files by 
      Tcl_GetEncoding() that is sought.  There is a mechanism
      provided for this as well:  lappend additional
      directories onto the global list variable ::tcl_libPath.
      
      And that is the point...  ah look he's getting it 
      now!  The documented purpose of tcl_libPath is
      to influence the search path of Tcl_GetEncoding(),
      but it doesn't in fact have that influence.  And
      that seems like a bug.  Putting it back...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [3e133fd89a] (rid 121201) by dgp on 2001-09-20 21:40:05:

    1. assignee changed to: "dgp"
    2. foundin changed to: "obsolete: 8.4a4"
    3. subsystem changed to: "38. Init - Library - Autoload"
  5. Ticket change [59714bb0d0] (rid 117978) by vincentdarley on 2001-09-20 21:45:24:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Glad you got it!  I was just trying to write a more 
      thorough explanation, but now it seems it boils down to
      
      "setting tcl_libPath should adjust the encoding search 
      path, but it doesn't"
      
      and either the above should be fixed or some other way of 
      setting the encoding search path should be provided.
      
      thanks for taking a second look...
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  6. Ticket change [3cea2d9d5a] (rid 120993) by dgp on 2001-09-20 22:29:15:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Just don't confuse my "getting it" with a commitment
      to provide an immediate fix!  ;-)
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [db148bbbc2] (rid 107900) by vincentdarley on 2002-02-05 22:53:23:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Changed bug summary to clarify what the problem is.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. title changed to:
      setting tcl_libPath doesn't change encoding search path
      
    5. username: "vincentdarley"
  8. Ticket change [1248f55374] (rid 95282) by dgp on 2002-02-23 06:41:34:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      I'm looking at this again, and it appears to me that
      changing $tcl_libPath to affect loading of encodings
      does not work, and never has worked.
      
      Given that, I'm not inclined to make it work.  I'd
      rather create something better.  The logic of having
      any connection between the search paths for encoding
      files and the value of some variable named tcl_libPath
      is completely lost on me.  It feels like the auto_path
      mistake all over again.
      
      I'd much rather add a new subcommand to [encoding],
      perhaps [encoding searchpath] and make that work
      as a means to set/query the set of directories searched
      for encoding data files.  That will require a TIP of
      course.  Vince, interested in helping me work that out?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [54fec45375] (rid 94052) by nobody on 2002-02-25 16:35:16:

    1. icomment:
      Logged In: NO 
      
      Sounds like a good plan to me.  Either way, it needs to be 
      documented that $tcl_libPath is effectively read-only, for 
      whatever it may be used.
      
      I could help a bit, especially with testing, and especially 
      in 2-3 weeks time...
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  10. Ticket change [83fe9fcff0] (rid 117476) by hobbs on 2002-04-27 10:39:03:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      I like the 'encoding path' idea as well (came to the same 
      conclusion myself when playing around in there).  The whole 
      hard-coded encoding stuff is bad.  Note that the path 
      should be absolute - none of this auto-appending 'encoding' 
      onto it as is currently done.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  11. Ticket change [045db49c4a] (rid 119989) by vincentdarley on 2002-04-30 00:29:36:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Some rather odd obserations about tclEncodings.c, which 
      should probably be fixed/resolved at the same time:
      
      tclEncodings.c and tclUnixTest.c both set and get the value 
      of the C
      variable tclDefaultEncodingDir, and tclBasic.c frees up any 
      memory
      associated with tclDefaultEncodingDir.  There are also 
      public APIs
      'Tcl_GetDefaultEncodingDir()', 'Tcl_SetDefaultEncodingDir
      ()'.
      
      However, that C variable is not actually /used/ anywhere in 
      Tcl for
      anything, and certainly not as a 'default encoding 
      directory'!
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  12. Ticket change [de16873231] (rid 114786) by techentin on 2004-05-05 23:40:04:

    1. icomment:
      Logged In: YES 
      user_id=43494
      
      Tclkit workaround:
      
      If you're trying to add encodings for tclkit, see 
      http://wiki.tcl.tk/RegisterNewEncodingsAtRuntime which 
      explains how to copy encoding files int $tcl_library at run time.
      
      
    2. login: "techentin"
    3. mimetype: "text/plain"
    4. username: "techentin"
  13. Ticket change [86b74d1a19] (rid 131564) by dkf on 2004-05-06 16:16:59:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I have yet to see an [encoding path] TIP.  Is there a likely
      horizon for this document being submitted?
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [f688178749] (rid 130318) by vincentdarley on 2004-05-06 19:45:50:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      For my part, I have no plans to submit such a TIP -- Vince.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  15. Ticket change [06667638c5] (rid 89221) by dgp on 2004-05-06 23:14:57:

    1. priority changed to: "7 High"
  16. Ticket change [6bfe4dd578] (rid 128422) by hobbs on 2004-05-06 23:20:03:

    1. foundin changed to: "obsolete: 8.5a2"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      There should be no expectation that setting a magic var
      changes the encoding path in Tcl currently.  However, I do
      plan a TIP for 8.5 of the form 'encoding path(s)|dirs', as
      it is the Right Thing.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  17. Ticket change [fae9349f62] (rid 91967) by vincentdarley on 2004-05-07 02:27:33:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Jeff: the Tcl documentation says:
      
      "When \fBTcl_GetEncoding\fR encounters an encoding
      \fIname\fR that has not
      been loaded, it attempts to load an encoding file called
      \fIname\fB.enc\fR
      from the \fBencoding\fR subdirectory of each directory
      specified in the
      library path \fB$tcl_libPath\fR.  If the encoding file
      exists, but is
      malformed, an error message will be left in \fIinterp\fR.
      "
      
      that certainly gives me the expectation that setting this
      var will change the current Tcl encoding path.  That's not
      to say this behaviour is good, or that 'encoding
      path(s)|dirs' is bad, just that Tcl does not follow its
      current documentation.
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  18. Ticket change [6ff94975f8] (rid 100395) by hobbs on 2004-05-07 02:58:50:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      You have to make some assumptions that you are allowed to
      set tcl_libPath in the first place, but the real problem is
      that comment is wrong in just about every aspect.  The
      tcl_libPath should not be considered a valid var, should not
      exist, and will likely be removed in any future version
      because it's a bogus red herring.
      
      What actually happens is that tcl_libPath is set to the
      internal library path on startup, and never referred to
      again.  It is a for-reference-only variable.  In that way
      the docs are correct, it's the assumption that setting
      tcl_libPath affects anything that is invalid.
      
      Which of course leads to a better question ... do we just
      want to manage the encoding directory, or allow some
      Tcl-level access to read *and* set the library path?
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  19. Ticket change [b61a521807] (rid 125365) by dgp on 2004-06-17 03:52:22:

    1. closedate changed to: "2004-06-16T20:52:22"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The false claims have been removed
      from the Encoding.3 documentation.
      
      A soon-to-be-written TIP will offer
      a new method for scripts to control
      the search path for *.enc files.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Wont Fix"
    7. status changed to: "Closed"
    8. username: "dgp"
  20. Ticket change [b7fc0273fd] (rid 128889) by nobody on 2005-08-08 17:52:02:

    1. icomment:
      Logged In: NO 
      
      In Tcl 8.5, I see "unsupported::EncodingDirs" as a new
      command. Is the plan (as per the 1 year old comment below)
      to write a new TIP to expose this?
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  21. Ticket change [1e535017b0] (rid 90951) by dgp on 2005-08-08 20:18:29:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      yes.
      
      feel free to use the [::tcl::unsupported]
      version for now, and report any trouble
      with it.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"