Page 1 of 1

2 strings that appear identical are not coming up equal

Posted: 31 Aug 2015 01:11
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?

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

Posted: 31 Aug 2015 04:16
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.

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

Posted: 09 Sep 2015 13:37
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.)