Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #12417
| Path | csiph.com!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail |
|---|---|
| From | "R.Wieser" <address@not.available> |
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: EOL type detection |
| Date | Sat, 5 Mar 2022 15:49:07 +0100 |
| Organization | Aioe.org NNTP Server |
| Lines | 24 |
| Message-ID | <svvt9e$v97$1@gioia.aioe.org> (permalink) |
| References | <bb79q57z2c92.16pyyy6q0tjfm.dlg@40tude.net> |
| Injection-Info | gioia.aioe.org; logging-data="32039"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| X-RFC2646 | Format=Flowed; Original |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| X-MSMail-Priority | Normal |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| X-Priority | 3 |
| Xref | csiph.com microsoft.public.scripting.vbscript:12417 |
Show key headers only | View raw
JJ,
> Currently ... it's a bit tedious. So, it there a simpler method.
Yes, but it comes at a cost :
[code]
set oFile = oFS.OpenTextfile(sFile)
sData = oFile.ReadAll
oFile.Close
p1=instr(sData,vbCR)
p2=instr(sData,vbLF)
[/code]
Now all you have to do is to compare p1 and p2 to get the types.
Apart from "malformed" files (mixing different EOLs) VBScript only seems to
have a problem with CR-only EOL's (reads everything as a single line).
Regards,
Rudy Wieser
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
EOL type detection JJ <jj4public@gmail.com> - 2022-03-05 15:39 +0700
Re: EOL type detection "Mayayana" <mayayana@invalid.nospam> - 2022-03-05 08:57 -0500
Re: EOL type detection JJ <jj4public@gmail.com> - 2022-03-06 06:27 +0700
Re: EOL type detection "R.Wieser" <address@not.available> - 2022-03-05 15:49 +0100
Re: EOL type detection JJ <jj4public@gmail.com> - 2022-03-06 06:28 +0700
Re: EOL type detection "R.Wieser" <address@not.available> - 2022-03-06 10:06 +0100
Re: EOL type detection JJ <jj4public@gmail.com> - 2022-03-08 05:36 +0700
Re: EOL type detection "R.Wieser" <address@not.available> - 2022-03-08 11:03 +0100
Re: EOL type detection JJ <jj4public@gmail.com> - 2022-03-09 09:30 +0700
csiph-web