Overview
| Artifact ID: | 4883028e3c6d87e3ca5d687a18c64d08a28be7e3 |
|---|---|
| Ticket: | 218305ffffffffffffffffffffffffffffffffff
tcl can not eval multibyte strings |
| User & Date: | nobody on 2000-10-26 00:55:56 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.2.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "57. zlib"
- title changed to: "tcl can not eval multibyte strings"
- type changed to: "Bug"