Changeset 2150


Ignore:
Timestamp:
Mar 25, 2011 3:44:28 PM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/lang/tcl/scripts/library.tcl

    r1142 r2150  
    503503        return ""
    504504    }
     505    # Expat (via tDOM) will always produce utf-8 output, regardless of the
     506    # encoding of the tool.xml.  We need to convert utf-8 to unicode for
     507    # Tcl/Tk.  This shouldn't affect ASCII tool.xml files.
     508    set string [encoding convertfrom utf-8 [$node text]]
    505509    if {$params(-decode) == "yes"} {
    506         return [Rappture::encoding::decode -- [string trim [$node text]]]
    507     } else {
    508         return [string trim [$node text]]
    509     }
     510        set string [Rappture::encoding::decode -- $string]
     511    }
     512    return [string trim $string]
    510513}
    511514
Note: See TracChangeset for help on using the changeset viewer.