Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > VB script, driving me crazy; vb bug ?

Reply
Thread Tools

VB script, driving me crazy; vb bug ?

 
 
albertlaszlo@gmail.com
Guest
Posts: n/a
 
      01-30-2008
I have a very simple vb code, that suppose to remove some binary
character codes from a string. The results are different if the code
is running from IIS-WinXp or IIS-WinServer. After hours of searching I
managed to isolate the code that is creating the problem, but i cannot
understand why. Here is the code :
Z1.asp
<%
function Hexof(s)
dim ix, so
for ix =1 to len(s): so = so & Hex(Asc(Mid(s,ix,1))) & ".": next
HexOf = so
end function

Function Test()
Dim ix, s1

s1=""
For ix = 127 To 191: s1 = s1 & chr(ix): next
response.write "127..191....." & Hexof(s1)

End Function

test
%>

The results I get in IE 6, are :
for IIS on Win XP (INCORRECT?)
127..191.....7F.0.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F .7F.7F.7F.7F.7F.7F.
7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F .7F.7F.7F.7F.7F.7F.
7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F.7F .7F.7F.7F.7F.7F.7F.

for IIS on Win 2000 server (as expected):
127..191.....7F.80.81.82.83.84.85.86.87.88.89.8A.8 B.8C.8D.8E.8F.
90.91.92.93.94.95.96.97.98.99.9A.9B.9C.9D.9E.
9F.A0.A1.A2.A3.A4.A5.A6.A7.A8.A9.AA.AB.AC.AD.AE.AF .B0.B1.B2.B3.B4.B5.B6.B7.B8.B9.BA.BB.BC.BD.BE.BF.

the funny part is that if run the same script from different locations
in the same IE session, I get inconsistent result
1. running XP\z1.asp returns the INcorrect result
2. running server\z1.asp returns the correct result
3. running XP\z1.asp returns the CORRECT result Surprised ?
I really am

Somebody might help me to get this thing out of my mind

Thanks
Laszlo

 
Reply With Quote
 
 
 
 
albertlaszlo@gmail.com
Guest
Posts: n/a
 
      01-30-2008
On Jan 30, 2:03 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot com> wrote:
> the difference would be the IIS version so you may want to post your question here:
>
> Microsoft\Outlook Express\microsoft.public.inetserver.iis


They are the same version.
I will post it in the indicated spot

Thanks

Laszlo
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-30-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I have a very simple vb code, that suppose to remove some binary
> character codes from a string. The results are different if the code
> is running from IIS-WinXp or IIS-WinServer.


I'm at a loss. I have tested your code on multiple servers (from NT4 to
to XP to WS2003) running versions of IIS from 5-6, on IE6 and IE7, and I
get the same result no matter where or how I run the code.

I don't believe the result of this code should depend on regional
settings or encoding, but I can think of nothing else that would come
close to explaining your results. You should try testing the code as a
..vbs file, varying your regional settings to see if they have any effect
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
Find function is driving me crzy Boris Mohar Firefox 1 11-24-2005 07:02 PM
Driving signals from a procedure Andy Peters VHDL 4 05-20-2005 08:51 AM
Multiple sources driving a bus + synthesis / implementation Henk De Denktenk VHDL 6 12-07-2004 02:15 AM
Driving INOUT ports Mike Nicklas VHDL 0 02-23-2004 03:45 PM



Advertisments