Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a4dd187f5a85b8a080571aba2974687fe5e9bfced19c52f4cf1dcfc4089cfceb
Ticket: a31caff05780aabdd20a8468673340435862dbf9
encoding command does not allow -strict to be used with -failindex
User & Date: oehhar on 2023-01-16 11:09:28
Changes

  1. icomment:
    Dear Jan,
    thanks for the comment.
    
    For me, the "-strict" option is an encoding variant.
    So, it is together with the encoding itself.
    
    The only "-strict" relevant TIP on my radar is TIP 346
    The TIP says, that:
    
       *   for utf-8 encoding, the byte sequence "\xC0\x80" is accepted without "-strict" and not accepted with it.
       *   invalid byte sequence handling in UTF-8. Replace any not encodable and incomplete byte by the the byte itself
    
    So, the TIP (without -strict) defines a UTF-8 encoding variant, where not encodable bytes are replaced by the data itself.
    IMHO, this is just a broken by design utf-8 variant, but ok, the TIP is as it is.
    
    The 2nd bullet of the TIP sould be handled by the error reporting mode, as with all other multi-byte encodings.
    
    Unfortunately, utf-8 is different.
    Here we have the situation, that we have two different encodings, one with an interesting replacement method of invalid bytes, one without.
    
    I hope, this interesting special handling will not go to other multi-byte encodings like shift-jis, big5, UTF-16....
    
    Thank you again,
    Harald
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. username: "oehhar"