Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 877ea6dba65a57d598e57dbd1af5c46073aebf74f4cc89a971621b9dd8352dde
Ticket: 6978c01b652ac87cfc7913f5e534825f15824768
Channel encoding difference 8.6 <-> 9.0
User & Date: oehhar on 2022-09-12 09:59:04
Changes

  1. icomment:
    Jan,
    thank you for the action, great !
    
    Some comments:
    
    <h1>Write error position</h1>
    
    I am not sure, which way would be best:
    
       *   work like a filter, e.g. all characters but the error characters are sent (new implementation).
       *   stop on error (old implementation).
    
    Example:
    <verbatim>
    fconfigure $h -encoding iso8859-1
    puts $h "A\u2022B"
    </verbatim>
    
    With the filter implementation, "AB" is sent, and an error is thrown.
    With the stop implementation, "A" is sent, and an errpr is thrown.
    
    IMHO, the error implementation would be better on a user level.
    If there is an error, I can introspect what happened and react on the channel, like sending "&h2022" and then resuming, e.g. sending "B".
    With the filter implementation, it is to late to act. The "B" is already sent.
    
    I think, the difference is small and not important.
    The only point is to document well, what is happenning.
    
    And I don't care, only get 9.0 out is the aim.
    
    <h1>UTF-8 special</h1>
    
    Ok, if UTF-8 is special, then we would need special test cases for that.
    So, I will add test cases for UTF-8 and another multibyte like shift-jis.
    I have to dig-in to find one which may have invalid sequences.
    
    I find it quite funny, that the ISO8859-1 folks get a work-around/compatibility layer, but all other system encodings don't get that.
    My system encoding is cp1250, which is similar to ISO8859-1. But all scripts only use ASCII, even comments. This is quite a challenge and quite critical.
    I remember, when we changed the encoding of msg files from system encoding to UTF-8 with TCL8.6. It failed at many places.
    
    I personally would prefer to throw an error for source to on invalid utf-8.
    If people want to migrate to TCL9 and the current system encoding is "shift-jis", they get garbage result and no error on the source command, as everything is accepted. I would prefer the error message.
    
    <h1>TIP633 scope</h1>
    
    The only scope of TIP633 is to get the TCL 8.6 behaviour optionally also available on TCL9.0. If UTF-8 accepts ISO8859-1, then this is ok and not covered by the TIP. 
    
    Thank you for all,
    Harald
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  5. username: "oehhar"