Changeset 2959


Ignore:
Timestamp:
Apr 10, 2012 4:12:19 PM (12 years ago)
Author:
gah
Message:

don't decode unencoded-strings (converting utf-8 string inadvertantly)

Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r2890 r2959  
    335335    AC_MSG_ERROR(oops! no avpicture_get_size ?!?))
    336336  AC_CHECK_FUNC(avpicture_fill,,AC_MSG_ERROR(oops! no avpicture_fill ?!?))
    337 
     337  AC_CHECK_FUNCS(sws_getCachedContext)
     338  AC_CHECK_FUNCS(img_convert)
     339  AC_CHECK_FUNCS(sws_scale)
    338340  AC_TRY_COMPILE([
    339341#define __STDC_CONSTANT_MACROS 1
  • trunk/gui/scripts/flowvisviewer.tcl

    r2876 r2959  
    10531053        }
    10541054        "movie" {
    1055             puts stderr "read [string length $bytes] bytes type=$info(-type) token=$info(-token)"
    10561055            set tag $this-$info(-token)
    10571056            set _hardcopy($tag) $bytes
  • trunk/lang/tcl/src/RpEncodeTclInterface.cc

    r2935 r2959  
    278278
    279279    string = Tcl_GetStringFromObj(objv[last], &numBytes);
    280 
     280    if (switches.flags == 0) {
     281        if (strncmp(string, "@@RP-ENC:", 9) != 0) {
     282            /* This string doesn't have a header, so it's not encoded.
     283             * Just return the string as-is. */
     284            Tcl_SetObjResult(interp, objv[last]);
     285            return TCL_OK;
     286        }
     287    }
    281288    Rappture::Buffer buf(string, numBytes);
    282 
    283289    Rappture::Outcome status;
    284290    if (!Rappture::encoding::decode(status, buf, switches.flags)) {
     
    286292        return TCL_ERROR;
    287293    }
    288     Tcl_SetStringObj(Tcl_GetObjResult(interp), buf.bytes(), buf.size());
     294    Tcl_SetByteArrayObj(Tcl_GetObjResult(interp),
     295                        (const unsigned char *)buf.bytes(), buf.size());
    289296    return TCL_OK;
    290297}
Note: See TracChangeset for help on using the changeset viewer.