11-19-2017, 06:09 +0100
AuthorPost
CyBex  08-07-2005, 17:46   | [TCL] convert text Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
Some helpfull procs

mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
CyBex  08-07-2005, 17:47   | htmlhex2char Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
                                                                                                                              
01
02
03
04
05
06
07
08
09
10
proc htmlhex2char text {
    set pos [string first % $text];
    while {$pos>=0} {
        set hex [string range $text [expr {$pos+1}] [expr {$pos+2}]]
        set char [format %c [scan $hex %x]];
        set text [string map [list %$hex $char] $text]
        set pos [string first % $text]
    }
    return $text
}


mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
schlenk  07-06-2006, 18:01  
Member since 07/2006
3 Posts
This looks like urledecode/urlencode:

Can also be done with the Tcllib ncgi package:
                                                                                                                              
1
2
3
package require ncgi ;# tcllib
ncgi::decode %20 ;# decode an urlencoded thing
ncgi::encode " " ;# encode an string for use in an url


Michael
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen