Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c2de85bcf2272fbab7c56d2e0be591346912e415c680dc75d49f05332e7a25be
Ticket: 1d26e580cfcb7ac096cfe9cd76c87f39415120c2
safe interp can't source files with BOM
User & Date: juliannoble2 on 2024-06-06 19:13:28
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Leaving aside the desirability of having a BOM on a utf-8 file - especially a package..
    Standard Tcl interps have no problem sourcing files with a BOM.
    
    Safe interps created with safe::interpCreate don't seem able to handle it.
    
    I think it should be consistent in this regard if possible.
    
    I encountered this with a non-public package that deals with BOMs in some of its data files - and it was dogfooding I guess, so the tm has one too. Can be worked around for the package itself - but may be an issue for making that package work in a safe interp with its datafiles too depending on whether source is used. (using something like the island concept on tcl wiki to allow limited access to a section of the filesystem)
    
    e.g with a package file named bomtest-1.0.tm in current dir containing nothing but "package provide bomtest 1.0" and saved with a BOM.
    
        % tcl::tm::add [pwd]
        % package require bomtest
        1.0
        % safe::interpCreate x
        x
        % x eval {package require bomtest}
        invalid command name " package"
    
  5. foundin changed to: "8.7,9.0"
  6. is_private changed to: "0"
  7. login: "juliannoble2"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "957fdfcd8744611e3fe1f4896c7538b1d9bf47b2"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "juliannoble2"
  14. subsystem changed to: "33. Safe Base"
  15. title changed to: "safe interp can't source files with BOM"
  16. type changed to: "Bug"