[thelist] Unicode in QueryString

Rob Whitener rwhitener at DesignOptions.com
Tue Feb 4 08:55:01 CST 2003


Instead of calling replace 256 times write a regular expresion that searches
the url string for the characters you are looking for.  This might be a long
and complicated regexp, but it woul probably be more efficient than all of
those function calls.  Some focused research on the web might even get you
the regexp already coded and tested.

Here is a link to get you started:

http://www.regxlib.com/

Hope it works out for you.

Rob
-----Original Message-----
From: Rob Smith [mailto:rob.smith at THERMON.com]
Sent: Tuesday, February 04, 2003 9:46 AM
To: Thelist (E-mail)
Subject: [thelist] Unicode in QueryString


Hi list,

Special Characters (Unicode) are translated via a code:
http://www.w3schools.com/html/html_ref_urlencode.asp
throughout querystrings. After looking at this page, is there away to avoid
this taxing function:

function replaceUnicode(value)
'replaces all Unicode chars from %00 to %ff
   value = replace(value,"%00","æ")
   value = replace(value,"%20"," ")
   value = replace(value,"%21","!")
   ...
   ...
   ...
   value = replace(value,"%ff","ÿ")
end function    'replaces all Unicode chars from %00 to %ff

At first glance, it seems like it would be the most straight forward path,
but extremely time consuming. Is there a better way to skin this cat (my
apologies to the environmentalists).

Rob.Smith
--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list