Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 084c9ac590f979c82020a9a6396ce8da3724d0f5
Ticket: 411825ffffffffffffffffffffffffffffffffff
Passing list w/UTF-8 from C can fail
User & Date: dossy on 2003-08-27 00:22:57
Changes

  1. icomment:
    Logged In: YES 
    user_id=21885
    
    I don't know if this should be entered as a seperate bug, but 
    it's related to this problem (similar fix should address both):
    
    % set a [list "abc  "]
    {abc  }
    
    This is correct -- since the list element ends in whitespace, 
    it's wrapped with {} for its string representation.
    
    % encoding system
    iso8859-1
    
    % set a [list "abc\240\240"]
    abc  
    
    Here, the string is "abc\240\240" but it's not being wrapped 
    by {}.  But, if [string is space \240] is 1, shouldn't it be?
    
    % encoding system utf-8
    % set a [list [encoding convertfrom utf-8 "abc\302\240\302
    \240"]]
    abc  
    
    Here, [string is space [encoding convertfrom utf-8 \302\240]] 
    = 1.  Again, the list element isn't being wrapped with {} -- 
    why?
    
    Parts of Tcl treat \240 or \302\240 as a space (and thus 
    don't insert a list delimiter character) but others don't treat it 
    as a space, so stringify'ing list elements don't get {} wrapped 
    around them.
    
    -- Dossy
    
    
    
  2. login: "dossy"
  3. mimetype: "text/plain"
  4. username: "dossy"