Is there a fast and easy way to convert the URL-Codes (%20 = <space>) to a normal string?
Hello,%20my%20name%20is%20EggDrop => Hello, my name is EggDrop
Kripton wrote:Is there a fast and easy way to convert the URL-Codes (%20 = <space>) to a normal string?
Hello,%20my%20name%20is%20EggDrop => Hello, my name is EggDrop
% set string "Hello,%20my%20name%20is%20EggDrop"
Hello,%20my%20name%20is%20EggDrop
% regsub -all {%20} $string { } output
4
% puts $output
Hello, my name is EggDrop
% string map {"%20" " "} $string
Hello, my name is EggDrop
Alternatly, use some proper code to do it. They will only convert the specific chars you tell it to, this function/procedure will convert all the required stuff in the text.