Skip to content
Tcl Source Code History Of Ticket 219283
Login

History Of Ticket 219283

Artifacts Associated With Ticket 219283

  1. Ticket change [5cbc57ad30] (rid 115356) by nobody on 2000-10-26 05:09:54:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1933 Bug
      Version: 8.1b3
      SubmitDate: '1999-04-26'
      LastModified: '1999-04-26'
      Severity: CRIT
      Status: UnAssn
      Submitter: stanton
      ChangedBy: stanton
      OS: All
      OSVersion: NA
      Machine: NA
      FixedDate: '2000-10-25'
      FixedInVersion: NA
      ClosedDate: '2000-10-25'
      
      
      It does not work well unfortunately.  I used this script with the cvs 
      version of core8.1 on Digital-Unix 4.0B and Linux 2.0.36.  I'll 
      describe the details below. 
      
      =====
      #!/usr/new/bin/tclsh8.1
      # eucjis
      # k.furukawa, apr.24.1999. 
      # based on message from scott stanton
      
      set usage "eucjis (-eucjjis|-jiseuc) (-read|-gets) {input-file} {output-file}"
      foreach {eucjis read input output} $argv {}
      if {$output == ""} { puts stderr $usage ; exit 1 }
      set infile [open $input r]
      set outfile [open $output w]
      switch -- $eucjis {
          -eucjis {
              fconfigure $infile -encoding euc-jp
              fconfigure $outfile -encoding iso2022-jp
          } -jiseuc {
              fconfigure $infile -encoding iso2022-jp
              fconfigure $outfile -encoding euc-jp
          } default { puts stderr $usage ; exit 1 }
      }
      switch -- $read {
          -read {
              puts -nonewline $outfile [read $infile]
          } -gets {
              while {[gets $infile line] != -1} {
                  puts $outfile $line
              }
          } default { puts stderr $usage ; exit 1 }
      }
      close $infile ; close $outfile
      =====
      
      (1) Old character set (not serious)
      
      Texts generated by tcl's iso2022-jp are lead by "<ESC> $ @", which 
      is an old sequence.  Rfc1468 and rfc1554 says 
            reg#  character set      ESC sequence                designated to
            ------------------------------------------------------------------
            6     ASCII              ESC 2/8 4/2      ESC ( B    G0
            42    JIS X 0208-1978    ESC 2/4 4/0      ESC $ @    G0
            87    JIS X 0208-1983    ESC 2/4 4/2      ESC $ B    G0
            14    JIS X 0201-Roman   ESC 2/8 4/10     ESC ( J    G0
      Character sets of 0208-1978 and 0208-1983 are slightly different.  
      If we don't want to specify the old character set explicitly, we 
      should use the new character set, 0208-1983, which is lead by 
      "<ESC> $ B". 
      
      (2) Unnecessary sequences (not serious)
      
      If I puts each line using "-gets" option above, each line is lead 
      by "<ESC> ( B" and followed by "<ESC> ( B", even if the line is all 
      composed of ASCII characters.  They are simply not necessary.  Only 
      Japanese (0208-1983) texts should be surrounded by "<ESC> $ B" and 
      "<ESC> ( B". 
      
      (3) Not conveted right from iso2022-jp to euc-jp (serious)
      
      I'll attach an example file jis1.txt.  The file is not converted 
      right with a command 
      "tclsh8.1 eucjis.tcl -jiseuc -gets jis1.txt euc1.txt". 
      The last character should be hexadecimal <A5><F3>, while tcl outputs 
      ASCII "%s".  I could find many examples.  Another example is jis2.txt, 
      which has 5 characters not converted right. 
      
      (4) Infinite loop in conversion from euc-jp to iso2022-jp (serious)
      
      If I convert line by line with "-gets" option above, the script 
      converts euc-jp texts into iso2022-jp, although it contains many 
      unnecessary escape sequences as described in (2).  
      
      However, if I use "-read", it sometimes goes into an infinite loop in 
      "puts", and outputs "<ESC> ( B" repeatedly.  It does not occur with 
      short texts.  I'll attach one of the example input file "euc.txt". 
      
      Sorry, I don't have time now to debug the tcl's encoding system.  But 
      if you have more questions, please ask me. 
      
      jis1.txt and jis2.txt are encoded in iso2022-jp, euc.txt in euc-jp. 
      
      Regards, Kazuro. 
      -----
      Kazuro FURUKAWA <[email protected]>  (or <[email protected]>)
       Linac,  High Energy Accelerator Research Organization (KEK), Japan
      
      
      This looks like there may be a problem with the 2022 encoding.  We need to verify the sub-tables and possibly change the order of the prefixes in the file to give preference to the newer sub-encodings.
      
      
      
    4. foundin initialized to: "obsolete: 8.1b3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "57. zlib"
    10. title initialized to: "iso2022-jp encoding is broken"
    11. type initialized to: "Bug"
  2. Ticket change [a0cf7393f3] (rid 96874) by dgp on 2001-04-06 03:10:57:

    1. subsystem changed to: "10. Objects"
  3. Ticket change [8adb559fc5] (rid 127459) by andreas_kupries on 2001-09-08 06:44:27:

    1. assignee changed to: "hobbs"
  4. Ticket change [5912f84c71] (rid 117914) by hobbs on 2001-10-05 03:33:58:

    1. closedate changed to: "2001-10-04T20:33:58"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      This is a rather old bug report, and the encodings have 
      been updated since then, so it would be nice to reverify 
      this.  Also, note in this thread:
      
      http://groups.google.com/groups?
      th=3521768f2de838da&seekm=3B698242.1F2365D2%40crd.ge.com
      
      that not all iso2022 encodings are created equal...
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "hobbs"
  5. Ticket change [81f45e5b9a] (rid 117133) by hobbs on 2002-03-05 04:57:43:

    1. closedate changed to: "2002-03-04T21:57:43"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      See http://sourceforge.net/tracker/?
      func=detail&aid=474358&group_id=10894&atid=310894 for 
      resolution.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. username: "hobbs"