Skip to content
Tcl Source Code History Of Ticket 735364ffff
Login

History Of Ticket 735364ffff

Artifacts Associated With Ticket 735364ffff

  1. Ticket change [cb20b9858a] (rid 95472) by setok on 2003-05-09 18:05:35:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The manpage states of the scan character 'a', "The data
      is a character string of length _count_". However it
      does not specify what this length is referring to. Does
      it mean number of characters or number of bytes? As it
      talks of a character string, this would lead one to
      believe that it means number of characters, yet the
      implementation apparently is for number of bytes.
      
      If it actually means bytes, this should be clearly
      mentioned and instead of 'character string' the term
      'byte array', or something similar, might be more
      appropriate.
      
      
    4. foundin initialized to: "obsolete: 8.4.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "setok"
    9. subsystem initialized to: "12. ByteArray Object"
    10. title initialized to: "Imprecise description of scan char 'a'"
    11. type initialized to: "Bug"
  2. Ticket change [3488a04a9e] (rid 106773) by dkf on 2003-05-12 15:42:00:

    1. title changed to: "Imprecise description of binary scan char 'a'"
  3. Ticket change [1692186a51] (rid 124736) by dkf on 2003-05-12 15:42:01:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Bytes are characters.  (I believe the conversion to byte
      array truncates...)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [0770ff01d9] (rid 89400) by nobody on 2003-05-12 23:57:57:

    1. icomment:
      Logged In: NO 
      
      If bytes are characters then this too has to be defined and
      a new name invented for what I would consider characters.
      Normally, with wide characters and Unicode I would not
      consider characters to be the same as bytes. One unicode
      character can use up more than one byte.
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [5c6a22fbef] (rid 115293) by patthoyts on 2003-05-13 16:32:03:

    1. icomment:
      Logged In: YES 
      user_id=202636
      
      Lets illustrate this:
      set s "\u266b\u266a" ;# two unicode characters.
      string length $s  -> 2
      string bytelen $s   -> 6 (ok counting nul terminator as well)
      binary scan $s c* r   -> 1
      set r         -> 107 106  - so just the low byte of each
      character
      binary scan %s a* r  ->  1
      set r         -> kj  - ascii representation of the low byte
      of each char.
      
      Maybe I'm missing something to do with encodings?
      
      
    2. login: "patthoyts"
    3. mimetype: "text/plain"
    4. username: "patthoyts"
  6. Ticket change [cbfd17d976] (rid 95611) by dkf on 2003-05-15 16:30:40:

    1. assignee changed to: "dkf"
  7. Ticket change [85bb23eddd] (rid 131365) by dkf on 2003-07-04 19:06:55:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Strictly, the behaviour of [binary scan] (or any other code 
      that converts strings to ByteArrayObjs) is only fully defined 
      when the input string only contains characters in the range 
      \u0000-\u00FF.  Strings are not byte arrays, but byte arrays 
      can be encoded in strings.
      
      We do not define what encoding is used with the 'a' [binary 
      scan] specifier; perhaps we should (I think we use ISO8859-1 
      though [encoding system] would also be reasonable.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  8. Ticket change [0ffe2b4917] (rid 94887) by setok on 2003-07-06 08:15:27:

    1. icomment:
      Logged In: YES 
      user_id=137542
      
      I'm getting confused with the discussion here. Isn't it just
      easiest to document the 'a' specifier as taking a count of
      bytes? Assuming the string just contains a byte array. Why
      does one need to bother about encoding? Take whatever is
      there directly as a byte array. That's at least exactly the
      behaviour I would want ...
      
      IMO strings are always byte arrays! Just that one character
      might use several bytes.
      
      
    2. login: "setok"
    3. mimetype: "text/plain"
    4. username: "setok"
  9. Ticket change [aabddf0769] (rid 100978) by dkf on 2003-07-12 04:20:03:

    1. closedate changed to: "2003-07-11T21:20:03"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Documented/tested the current behaviour (in both HEAD and
      8.4 branch.)  At least this way we don't need a TIP to
      "improve" things, though it is still an open question
      whether things ought to be the way they are...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"