Page 2 of 3

Re: Processing Semicolon

Posted: 17 May 2016 19:12
by tiago
In this case it is known, SammaySarkar.

I have several of those files and online locations to process thus the need of mastering the problem.
Have you tried to use readfile on the sample plus the posted test script?

Re: Processing Semicolon

Posted: 18 May 2016 07:06
by bdeshi
You still haven't said what you want to do.

Re: Processing Semicolon

Posted: 18 May 2016 07:13
by tiago
Eliminate the semicolon which is not being recognized by the described routine.

Re: Processing Semicolon

Posted: 18 May 2016 07:42
by bdeshi
Aha! that semi-colon is actually the greek question mark character.

Try this script:

Code: Select all

regexreplace(<your text>,"(\(..\))(\u037e|;)", "$1");
The regex matches any TWO characters within braces. This pattern handles both a normal ; and that special character.

Re: Processing Semicolon

Posted: 18 May 2016 08:34
by tiago
A-hah!!!
:P

But... why ASC reported it as being 59? Why once pasted into the forum and copied from it it behaves as a regular semicolon? Is there a general formula which could prevent ANY breaking of regexmatches on any other unknown character like this one? Could you please elaborate a bit on this?

Thanks-a-bunch! :tup:

Re: Processing Semicolon

Posted: 18 May 2016 08:40
by highend
Because it's not in the ascii table?

There is no general formula, regexes with unicode chars are completely different than regexes inside the ascii character set

Re: Processing Semicolon

Posted: 18 May 2016 09:24
by tiago
And how can a user find the difference? I mean... that special character is matched when a simple semicolon is searched by CTRL+F on Notepad, but regexmatches didn't recognized it as a twin.

@SammaySarkar: how did you find the difference?

Re: Processing Semicolon

Posted: 18 May 2016 10:32
by bdeshi
Well, I tried matching a ";" but that didn't succeed, so the only logical conclusion was that it wasn't in fact a semi-colon, leading me to look at the character code. You can find this code with a hex editor. I just used the HexSel plugin of AkelPad.

Re: Processing Semicolon

Posted: 19 Jun 2016 20:27
by tiago
Similar question, I guess.

XYplorer sc NEW fails to create "d:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz" mirror (zero size) file.
Pasting source path into pspad or notepad++ reveals nothing special.
=> removing any single letter from 'WwwComBr\wwwcombr25_01\linux' out of the addy bar part allows the creation.

Try it:

Code: Select all

new ("d:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz", file); beep;
although I think that copy from browser into XY addy bar will remove the potential invisible char.

XYplorer hex view:

Code: Select all


00000000: 64 00 3A 00 5C 00 78 00 32 00 5C 00 57 00 77 00   d.:.\.x.2.\.W.w.
00000010: 77 00 43 00 6F 00 6D 00 42 00 72 00 5C 00 77 00   w.C.o.m.B.r.\.w.
00000020: 77 00 77 00 63 00 6F 00 6D 00 62 00 72 00 32 00   w.w.c.o.m.b.r.2.
00000030: 35 00 5F 00 30 00 31 00 5C 00 6C 00 69 00 6E 00   5._.0.1.\.l.i.n.
00000040: 75 00 78 00 5C 00 61 00 70 00 61 00 63 00 68 00   u.x.\.a.p.a.c.h.
00000050: 65 00 5F 00 31 00 2E 00 33 00 2E 00 32 00 34 00   e._.1...3...2.4.
00000060: 2E 00 74 00 61 00 72 00 2E 00 67 00 7A 00         ..t.a.r...g.z.  


Re: Processing Semicolon

Posted: 19 Jun 2016 20:34
by highend

Code: Select all

new("d:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz", "file");
Works fine...

Re: Processing Semicolon

Posted: 19 Jun 2016 20:58
by tiago
tiago wrote: although I think that copy from browser into XY addy bar will remove the potential invisible char.
Here too.
I'm trying to strip down the source file and code so I can share a more reliable sample.

Thank you for trying.

Re: Processing Semicolon

Posted: 19 Jun 2016 21:00
by highend
Just post the part that gets / build / whatever the url and transforms it into the real path?

Re: Processing Semicolon

Posted: 19 Jun 2016 22:05
by tiago
I see the problem now.

Say you have a file
Linux (yes, no extension)
new("d:\x2\WwwComBr\wwwcombr25_01\Linux", "file");

then you try to create

new("d:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz", "file");

the existing file 'Linux' will prevent the creation of a folder 'linux' at the same directory.

Anything I could do about this apart from testing existence of each component of each file that'll be created...?

Re: Processing Semicolon

Posted: 19 Jun 2016 22:10
by highend
Nope

Re: Processing Semicolon

Posted: 19 Jun 2016 22:18
by tiago
Thanks!

//%$#@#$%%$##$%*&$!!@#$#$$*&%#@$$#@!@#$%% ¨¨