Changeset 660 for trunk/src


Ignore:
Timestamp:
Apr 3, 2007, 4:27:40 PM (18 years ago)
Author:
dkearney
Message:

repeated the utf re-encoding inside the encode function because binary data could be returned there too if someone wants to gzip a file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tcl/src/RpEncodeTclInterface.cc

    r659 r660  
    295295    }
    296296
    297     Tcl_AppendToObj(result,buf.bytes(),buf.size());
     297    Tcl_DString dstPtr;
     298    Tcl_DStringInit(&dstPtr);
     299    Tcl_ExternalToUtfDString(NULL,buf.bytes(),buf.size(),&dstPtr);
     300    Tcl_AppendToObj(result,Tcl_DStringValue(&dstPtr),Tcl_DStringLength(&dstPtr));
     301    Tcl_DStringFree(&dstPtr);
    298302
    299303    return TCL_OK;
Note: See TracChangeset for help on using the changeset viewer.