Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 55eaead8d78840db24591766bab105dab1bdcc0f
Ticket: 624919ffffffffffffffffffffffffffffffffff
Tcl_AppendToObj docs confusing
User & Date: hobbs on 2002-10-22 00:40:19
Changes

  1. icomment:
    Logged In: YES 
    user_id=72656
    
    Do you really intend to have the NULL there, or do you just 
    want to ensure that it's null terminated?  If the latter, don't do 
    anything extra - Tcl handles that.  If the former, then you 
    should either be using the Tcl_ByteArrayObj stuff, or you 
    should use Tcl_ExternalToUtf and friends.  That said:
    
    a) No, there are lots of other APIs to handle that, as noted 
    above.
    
    b) This may indicate exactly where the problem is.  While 
    you can print it just fine (and it may be holding the NULL in 
    there, you just can't see it), the info exists may not include 
    the null when it passes the value through a strlen or such 
    (that's why NULL get's special encoding), which is the source 
    of the problem you are seeing.
    
    
  2. login: "hobbs"
  3. mimetype: "text/plain"
  4. username: "hobbs"