Print Page | Close Window

Weird character addition

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5254
Printed Date: 30 March 2026 at 11:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Weird character addition
Posted By: pmormr
Subject: Weird character addition
Date Posted: 24 August 2003 at 4:34pm

look at the following code

line2 = Replace(line, "<IMG SRC="" http://www.funnymail.com/webdata/cs/ - http://www.funnymail.com/webdata/cs/ ", "")
line2 = Replace(line2, """></P>", "")
mrpath = "C:/Documents and Settings/Administrator.SHAWN-9W8E523KB/Local Settings/Temporary Internet Files/" & line2
Response.Write mrpath
Response.end

now if line2 was initially equal to <IMG SRC=" http://www.funnymail.com/webdata/cs/ - http://www.funnymail.com/webdata/cs/ 20030422.gif"></p> you would think that this code would return "C:/Documents and Settings/Administrator.SHAWN-9W8E523KB/Local Settings/Temporary Internet Files/20030422.gif", right? Look at what it returns

C:/Documents and Settings/Administrator.SHAWN-9W8E523KB/Local Settings/Temporary Internet Files/ 20030422.gif

notice that the space between the filename at the end and the folder "tempory internet files". This is driving me crazy, this code should return a filename without the space at the beginning. Instead it produces the wrong filename and i can't use that with the FSO, because it doesn't exist. HeLLLLLLLLLLLLLLLPPPPPPPPP!



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Replies:
Posted By: pmormr
Date Posted: 24 August 2003 at 4:37pm
oops, i forgot to mention that the augmentation occurs somewhere between lines 2 and 3. It comes out fine when i print it out after line 2. but then it somewhere changes by the end of line 3.

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Mikeap
Date Posted: 24 August 2003 at 5:22pm
Remove all spaces in line 2 and 3 ... see if it works?

-------------
I am dedicated to being addicted.


Posted By: pmormr
Date Posted: 24 August 2003 at 5:30pm
no go, still with the space

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: b_bonnett
Date Posted: 24 August 2003 at 5:50pm

Just as a test, try mrpath = ... & line2 & "test" and tell me what it prints out.

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: Mikeap
Date Posted: 24 August 2003 at 5:54pm
On the mrpath = ... its been my experience to remove the spaces after before and after the &

-------------
I am dedicated to being addicted.


Posted By: pmormr
Date Posted: 24 August 2003 at 8:03pm
C:/Documents and Settings/Administrator.SHAWN-9W8E523KB/Local Settings/Temporary Internet Files/ 20030422.giftest

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: pmormr
Date Posted: 24 August 2003 at 8:04pm
whitespace doesn't matter mikeap

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: MorningZ
Date Posted: 24 August 2003 at 8:19pm

try

line2 = Replace(line, "<IMG SRC="" http://www.funnymail.com/webdata/cs/ - http://www.funnymail.com/webdata/cs/ ", "")
line2 = Replace(line2, """></P>", "")
mrpath = Trim("C:/Documents and Settings/Administrator.SHAWN-9W8E523KB/Local Settings/Temporary Internet Files/") & Trim(line2)
Response.Write mrpath
Response.end



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: MorningZ
Date Posted: 24 August 2003 at 8:20pm
and btw, i guarentee its nothing funny going on with the ASP dll, its gotta be your code....    the stuff doesn't do anything you dont tell it to

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: pmormr
Date Posted: 24 August 2003 at 8:22pm
that did the trick, thanks

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net