2 strings that appear identical are not coming up equal

Discuss and share scripts and script files...
Post Reply
mydarkpassenger
Posts: 31
Joined: 19 Apr 2014 19:39

2 strings that appear identical are not coming up equal

Post by mydarkpassenger »

I wrote a small program in c# which I call with runret. The program takes the current file path and does some modifications and returns an updated path. The path appears to come out correctly. However, xyplorer's scripting engine keeps telling me it's an invalid path. Even when I copy and paste the output that xyplorer thinks is invalid right into the address bar it works. Also when I compare the data it tells me is invalid against the variable my script is generating it's telling me they aren't equal. Obviously xyplorer is making modifications to the variable before it's displaying it to clean it up or something. I can't find out what's wrong if it won't tell me what's invalid in my path so I'm wondering if there's a way I can see the raw data of the variable?

mydarkpassenger
Posts: 31
Joined: 19 Apr 2014 19:39

Re: 2 strings that appear identical are not coming up equal

Post by mydarkpassenger »

Not really a perfect solution but what I found is the result appeared to be appending a carriage return at the end. I tried using a regexreplace to take care of any characters I didn't want, but that didn't work. What I ended up doing was appending a semi-colon to my program output and using it as the separator for a token split where I grabbed the first token. Everything is good now.

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: 2 strings that appear identical are not coming up equal

Post by PeterH »

*If* it's only the CR (or CRLF) you just could use this as the separator for the split.
(A file name *could* include a semicolon.)

Post Reply