mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2006
Posts: 24
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Apr 2006
Posts: 24
Hello,

Using mIRC 6.17 on Win XP SP2. No Scripts loaded.

I was trying to do $lines() of a file that was 33451 lines long (according to Textpad and Programmers Notepad), but mIRC returned 6029. With the help of the nice people on DALnet's #Scripting, they suggested I look for weird characters or control characters on that line. Sure enough, I found some control characters. I cleared that line, and ran the $lines again, and found another line. I did that again, again, and again. It eventually worked.

I took a look at the lines that mIRC was screwing up on, tried to find some points of commonality. Turns out, in each of those lines, the SUBstitue ASCII control character (26) was used. My hypothesis is that mIRC thinks the file ends at the SUB, or mIRC can't handle it, so it ends the operation.

Here is a link to the text file that contains the actual strings that mIRC was messing up that I pulled from the log file. Here is a PNG of that text file.

I tested out my hypothesis with a new text file of 30 lines. The first 15 lines were normal text, the 16th line was a SUB, and 17-30 were normal text. As predicted, mIRC returned 15, when it should have done 30. The files used are here (TXT) and image (PNG)

Looking foward to mIRC 6.18. wink

Special thanks to Nimbus who gave me hosting to put these files up. He demands I put the below:
Quote:
(12:03:04 am) « Nimbus » ;For Nimbus, for being such a good looking and caring on of a <censored>
(12:03:11 am) « Nimbus » son*


EDIT:
Upon further testing, it seems that mIRC has this flaw throughout the program. If a SUB is the 5th character on line 5 but i do something like /write -l10 <filename> asdf, it won't work. Instead mIRC will change the file so that lines 1-4 are writte, and the 4th character of the line 5 are written, stopping just before the SUB.

Last edited by ARcanUSNUMquam; 26/05/06 07:36 AM.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I dont know what this "SUB" is but $chr(26) is the EOF (end of file) marker character, so i can sure see why the file is seen to have ended.

I dont aggree with this being the correct thing that should be done but i beleive that is the reason.

I wonder if it is mirc or maybe an under lying compiler code problem or even the OS method used to access the file?


Link Copied to Clipboard