| |
cruiser
Posts: 25
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
|
Found this interesting script. '************************************** ' Name: UNICODE Convert to char - Conver ' sion without database ' Description:Show how to convert Unicod ' e to char. It will be usefull when knowi ' ng what has on a URL means something to ' you. For instance, if people get to your ' site from a search engine. What did they ' typed to get on your site. There is much more into this. The real subject is web marketing. if someone has news on it please Let me know. ' By: ' ' Inputs:' your vote is appreciated ' ' Returns:' your vote is appreciated ' 'This code is copyrighted and has ' limited warranties.Please see http://w ' ww.Planet-Source-Code.com/xq/ASP/txtCode ' Id.6819/lngWId.4/qx/vb/scripts/ShowCode. ' htm 'for details. '************************************** <%@ Language=VBScript %> <% ' Show how to convert Unicode to char. I ' t will be usefull when knowing what has ' on a URL means something to you. For ins ' tance, if people get to your site from a ' search engine. What did they typed to ge ' t on your site. ' There is much more into this. ' The real subject is web marketing. ' If someone has news on it please let m ' e know. marcio@diamond.com Dim varUnicode Dim showUnicode Dim I Dim intPosition if Len(Request.QueryString("text2")) > 0 Then varUnicode = Request.QueryString("text2") For I = 30 To 255 intPosition = instr(1, UCASE(varUnicode), "%" & UCase(Hex(I))) if intPosition <> 0 Then showUnicode = REPLACE(varUnicode, "%" & UCase(Hex(I)), chr(I), 1, -1, 0) showUnicode = REPLACE(showUnicode, "%" & LCase(Hex(I)), chr(I), 1, -1, 0) varUnicode = showUnicode End if Next End if %> <HTML> <HEAD><LINK rel="stylesheet" type="text/css" href="../Style Sheet1.css"> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY ><BR><BR> <CENTER><H2> Unicode Conversion </H2> <FORM NAME="Unicode" ACTION="UnicodeReplace1.asp" METHOD="get"> <TABLE WIDTH="75%" BGCOLOR=white BORDER=1 CELLSPACING=1 CELLPADDING=1 style="HEIGHT: 100px; WIDTH: 976px" > <TR> <TD>Enter URL With Unicode <BR> (i.e. %22 and so on..)</TD> <TD><INPUT id=text2 name=text2 value="adoublequotehere%22+andacommahere%3b&itwillbeusefull" style="HEIGHT: 22px; WIDTH: 782px"></TD> </TR> <TR> <TD>Here is the Results.</TD> <TD><INPUT id=text1 name=text1 value="<%=server.htmlencode(showUnicode)%>" style="HEIGHT: 22px; WIDTH: 782px"></TD> </TR> <TR> <TD COLSPAN=100><CENTER><INPUT type="button" value="Convert From Unicode to Char" ONCLICK="submit();" id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 228px"></CENTER></TD> </TR> </TABLE> <P> </P></CENTER></FORM> </BODY> </HTML>
|
|