got a quick question, and I didn't find an answer for it from searching here.
I need to take a text string, and replace ascii characters (or all or them would be fine too) into their ascii hex equivalents, so it can be sent to a php script, for example:
set t [string map {"§" "%A7"} $t]
set t [string map {"®" "%AE"} $t]
that method (and regsub) works fine for normal ascii characters, but not extended ascii characters, like the 2 shown above. And without that conversion, query strings with extended ascii characters keep failing.
Here's a sample query that gets sent:
Code: Select all
http://domain.com/scs/info.php?username=§ent§
Code: Select all
http://domain.com/scs/info.php?username=%A7ent%A7