Processing Semicolon

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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?
Power-hungry user!!!

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Processing Semicolon

Post by bdeshi »

You still haven't said what you want to do.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post by tiago »

Eliminate the semicolon which is not being recognized by the described routine.
Power-hungry user!!!

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Processing Semicolon

Post 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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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:
Power-hungry user!!!

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Processing Semicolon

Post 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
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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?
Power-hungry user!!!

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Processing Semicolon

Post 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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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.  

Power-hungry user!!!

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Processing Semicolon

Post by highend »

Code: Select all

new("d:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz", "file");
Works fine...
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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.
Power-hungry user!!!

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Processing Semicolon

Post by highend »

Just post the part that gets / build / whatever the url and transforms it into the real path?
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post 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...?
Power-hungry user!!!

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Processing Semicolon

Post by highend »

Nope
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Processing Semicolon

Post by tiago »

Thanks!

//%$#@#$%%$##$%*&$!!@#$#$$*&%#@$$#@!@#$%% ¨¨
Power-hungry user!!!

Post Reply