Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4883028e3c6d87e3ca5d687a18c64d08a28be7e3
Ticket: 218305ffffffffffffffffffffffffffffffffff
tcl can not eval multibyte strings
User & Date: nobody on 2000-10-26 00:55:56
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3669 Bug
    Version: 8.2.2
    SubmitDate: '1999-11-23'
    LastModified: '2000-03-30'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: BSD
    OSVersion: tcl8.2.2
    Machine: FreeBSD-3.3
    FixedDate: '2000-10-25'
    ClosedDate: '2000-03-30'
    
    
    Name:
    Taguchi Takeshi
    
    Extensions:
    plus patch for Tcl8.2.2
    
    CustomShell:
    I've made a tcl extension which determin Japanize encoding (detection engine come from SRA's Japanized
    
    Comments:
    i18n functions in tcl8.2 is not good enough.
    But supporting it is a good news for us.
    Please enhancement it.
    
    ReproducibleScript:
    # In the following example, file kanji.jis is a file which encoding is iso2022-jp.
    # but I want to read as "binary string", and I want to analyze which encoding it is, and
    # convert to system encoding manualy. but ......
    set fp [open "kanji.jis"]
    fconfigure $fp -encoding binary
    set line [read $fp]
    catch [list close $fp]
    
    eval "set str $line" ; # <- produce error!
    
    DesiredBehavior:
    I think 
         eval $str
    will be error. str contain something multibyte string, not system encoding.
    
    This means all programmer and user must know script and its input/output encoding befor
    evaluation.
    
    But it is not good.
    Imagin internet applications. the Internet is world wide. so programmer can not determin
    user's encoding befor evaluation.
    
    
    
    I'm not quite sure that the above is an error.  The user isn't
    properly protecting the values against whitespace, as the
    following example shows:
    
    (tkcon) 49 % set line "a space here"
    a space here
    (tkcon) 50 % eval "set str $line"
    wrong # args: should be "set varName ?newValue?"
    (tkcon) 51 % eval [list set str $line]
    a space here
     
    -- 03/30/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.2.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "57. zlib"
  10. title changed to: "tcl can not eval multibyte strings"
  11. type changed to: "Bug"