A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reading an .ini file with Notepad using Windows 10



 
 
Thread Tools Rate Thread Display Modes
  #31  
Old June 20th 18, 06:25 PM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Reading an .ini file with Notepad using Windows 10

"Nil" wrote


| The color
| coding isn't specific enough to be worth having.

|It's as specific as you tell it to be.

Like a lot of Swiss-Army-Knife editors, it can color-
code dozens of languages. But it does that by generalizing.
For example, in HTML it doesn't see CSS or script. In
script it doesn't see variables. In CSS it can color-code
properties but can't show me the choice of values.

It can't provide any specialized functionality for
languages because it doesn't really recognize them.
It just uses guidelines to color-code keywords and
strings in virtually any language.
You tell it your language, tell it the keywords and
how strings and comments are marked, and it
colorcodes. Better than nothing, but not really all
that useful.

So most people who use any kind of coding language
are going to want an editor built to accommodate it,
rather than an editor that can accomodate 50 languages
but specializes in none.

What else can N++ do? Macros? Maybe you use them.
I don't. Plugins? I haven't see anything compelling.
View an HTML file in a browser? Any decent HTML
editor can do that plus a lot more that's specific to
HTML.

Which is not to criticize. I think N++ is very solid.
But it's a general editor like many, many others. I
suspect the almost cultish fervor around this kind
of editor (emacs and vi would be in the same category)
comes out of the same view as people who swear
by command line. There's a slightly macho attitude.
Mouse is for sissies. Conveniences are for sissies.
Intellisense? Sissy. Informative, contextual tooltips?
Sissy. Once you look at it that way, N++ is as fancy
as you can afford to get without being a sissy. I
imagine the fans like to think of themselves as driving
a stick shift with no carpeting; a pack of Marlboros
rolled into their t-shirt sleeve. The classic suburban
savage. The romance of imagining getting one's hands
dirty.

I look at it differently. Any convenience that saves
repetition or leaving the editor is welcome. I'm not
concerned with being a sissy, or not. Getting my hands
dirty, or not. I just appreciate good tools that make
the job easier.
I daresay that's a big reason why Microsoft has been
so successful at attracting developers. They make good
tools that help to make the job easier.

| Notepad++ doesn't even provide an SDI mode. (One
| window for each file.)
|
| Good! If it did have that feature it would be overproduced.

I guess that goes to show that people have different
preferences. Though I wonder why the author has a whole
tab in the settings for multi-instance when he doesn't
actually offer any related settings. Maybe a practical
joke to scare off the sissies?



Ads
  #32  
Old June 20th 18, 07:54 PM posted to alt.comp.os.windows-10
Ken Blake[_5_]
external usenet poster
 
Posts: 2,221
Default Reading an .ini file with Notepad using Windows 10

On Wed, 20 Jun 2018 12:45:24 -0400, Nil
wrote:

On 20 Jun 2018, "Mayayana" wrote in
alt.comp.os.windows-10:

I like it for dealing with extremely large files. It's
clean, dependable and well built. But aside from opening
2 MB files quickly, it's little more than an overproduced
version of Notepad, using 3 times the RAM.


That's an odd description. It has dozen's of useful features that
Notepad would never dream of having. Just because you don't use them
doesn't mean it's "over produced".




Although I agree with you, I also agree with Mayayana. It's way more
that the vast majority of users of any text editor needs.
  #33  
Old June 20th 18, 08:30 PM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Reading an .ini file with Notepad using Windows 10

Mayayana wrote:
"malone" wrote

| https://www.dropbox.com/s/3hpgu1fgxs...4_W10.ini?dl=0 (.ini
| file created by Irfanview on the misbehaving Windows 10 machine)

What a mess. It looks like maybe you tried to edit it with
a program that didn't recognize unicode properly. Or maybe
you accidentally saved it as ANSI? Or maybe you tried to
edit it in a complex editor like Word and that misinterpreted
characters? The reason I say that is because, in addition to
the glitch with returns that Paul mentioned, part of the file
is actually ANSI. It's just not visible when the file is opened
as unicode. Starting with [WinPosition] it turns to ANSI.
That made me think that a special-use editor that sees [ as
a key character might be able to do the damage I see.

Maybe try just deleting it. IV should create a new copy.

Also, for what it's worth: Dropbox URLs that end with
"dl=0" can be turned into direct file links by switching it
to "dl=1". dl stands for "download". With dl=0 you have to
load the webpage and must have script enabled. With
dl=1 you get a download dialogue directly.


I had another thought, after looking at the *end* of
the i_view64_W10.ini .

The text at the top of the file uses double-byte characters.

The text at the bottom uses single-byte characters.

Even if the /b binary handling switch was used in a "copy"
concatenation command like the following, it's not likely
that a unicode file concatenated to a normal ASCII file,
would be "correct" when stored as out.txt. But this almost
looks like what was attempted. The first command
would work, if copy was well designed to analyze all
files and select the "correct" representation. Maybe
the "type" command would be better for this, but mixing
file types is just a bad idea.

copy file1.txt+file2.txt out.txt # bad if mixing Unicode and ANSI

copy /b file1.txt+file2.txt out.txt # still bad, will look weird
# at the end

With the hex editor, look at offset 0x3CA0 in i_view64_W10.ini,
and you can see where the funny bit happens. Whatever "process"
did that, likely also modified line ending characters,
messing up double byte CR and LF and making unknown
Unicode character blocks appear.

I could understand to some extent, the possibility
of this happening if you multi-booted. And edited
from some other OS. How it got that way though,
is pretty mysterious. I think the visual disturbance
is caused by the line endings, but the single-byte
characters at the end look like an attempt at
concatenation.

Paul
  #34  
Old June 20th 18, 09:41 PM posted to alt.comp.os.windows-10
Chris
external usenet poster
 
Posts: 832
Default Reading an .ini file with Notepad using Windows 10

Frank Slootweg wrote:
Chris wrote:
[...]

Notepad++ is always the right solution


Notepad[++] is for WIMPs. Real Men (TM) use vi[m](1)!


In other OSes I agree with you. In windows it just feels like a contortion.

  #35  
Old June 20th 18, 09:51 PM posted to alt.comp.os.windows-10
Chris
external usenet poster
 
Posts: 832
Default Reading an .ini file with Notepad using Windows 10

Mayayana wrote:
"Chris" wrote

| Notepad++ is always the right solution

I like it for dealing with extremely large files. It's
clean, dependable and well built. But aside from opening
2 MB files quickly, it's little more than an overproduced
version of Notepad, using 3 times the RAM. The color
coding isn't specific enough to be worth having. None
of it is actually specific to any coding language. So
it's mostly just a really good version of a text editor.
But since text is "just text", Notepad++ is rarely
any more useful than Notepad.


I think you've described it about right. Notepad++ is essentially notepad
done right. It doesn't do much more, but the improvements make it a
worthwhile addition for pretty much everyone, with no compromise.

Personally I use Notepad far more than anything else.
I often have a few instances open with text snippets.
I jot down URLs or phone numbers. I save webpages as
text by copying/pasting into Notepad.

Notepad++ doesn't even provide an SDI mode. (One
window for each file.) It has 3 options for multi-instance
window and they all give me a single window with tabs.
I can hide the tab bar, but that also doesn't give me
SDI windows!


I regularly share files between windows, macOS and Linux so notepad's
inability to deal with those files is a deal breaker.

Plus, does notepad still have a ridiculously small file size limit?

  #36  
Old June 20th 18, 10:45 PM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Reading an .ini file with Notepad using Windows 10

"Chris" wrote

|
| Plus, does notepad still have a ridiculously small file size limit?
|

I don't know about limit. If it's more than 64K
characters then it's probably 4B characters.
But it takes a very long time to load a big file.
I don't know why. That's what made me get N++.


  #37  
Old June 20th 18, 11:28 PM posted to alt.comp.os.windows-10
malone
external usenet poster
 
Posts: 37
Default Reading an .ini file with Notepad using Windows 10

On 21-Jun-2018 7:30 am, Paul wrote:
Mayayana wrote:
"malone" wrote

| https://www.dropbox.com/s/3hpgu1fgxs...4_W10.ini?dl=0 (.ini
| file created by Irfanview on the misbehaving Windows 10 machine)

Â*What a mess. It looks like maybe you tried to edit it with
a program that didn't recognize unicode properly. Or maybe
you accidentally saved it as ANSI? Or maybe you tried to
edit it in a complex editor like Word and that misinterpreted
characters? The reason I say that is because, in addition to
the glitch with returns that Paul mentioned, part of the file
is actually ANSI. It's just not visible when the file is opened
as unicode. Starting with [WinPosition] it turns to ANSI.
That made me think that a special-use editor that sees [ as
a key character might be able to do the damage I see.

Â*Â* Maybe try just deleting it. IV should create a new copy.

Â* Also, for what it's worth: Dropbox URLs that end with
"dl=0" can be turned into direct file links by switching it
to "dl=1". dl stands for "download". With dl=0 you have to
load the webpage and must have script enabled. With
dl=1 you get a download dialogue directly.


I had another thought, after looking at the *end* of
the i_view64_W10.ini .

The text at the top of the file uses double-byte characters.

The text at the bottom uses single-byte characters.

Even if the /b binary handling switch was used in a "copy"
concatenation command like the following, it's not likely
that a unicode file concatenated to a normal ASCII file,
would be "correct" when stored as out.txt. But this almost
looks like what was attempted. The first command
would work, if copy was well designed to analyze all
files and select the "correct" representation. Maybe
the "type" command would be better for this, but mixing
file types is just a bad idea.

Â*Â* copy file1.txt+file2.txt out.txtÂ*Â*Â*Â*Â*Â*Â*Â*Â*Â* # bad if mixing Unicode
and ANSI

Â*Â* copy /b file1.txt+file2.txt out.txtÂ*Â*Â*Â*Â*Â*Â* # still bad, will look
weird
Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â* Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â* # at the end

With the hex editor, look at offset 0x3CA0 in i_view64_W10.ini,
and you can see where the funny bit happens. Whatever "process"
did that, likely also modified line ending characters,
messing up double byte CR and LF and making unknown
Unicode character blocks appear.

I could understand to some extent, the possibility
of this happening if you multi-booted. And edited
from some other OS. How it got that way though,
is pretty mysterious. I think the visual disturbance
is caused by the line endings, but the single-byte
characters at the end look like an attempt at
concatenation.

Â*Â* Paul


Right. I think I've discovered the problem.

Many years ago I wrote a VBScript to collect various images and then run
a slideshow using Irfanview. This gets run several times a day - and
only on this "misbehaving" W10 computer. As part of that script I
modified the Irfanview .ini file programatically - copying the contents
of i_view64.ini into another file changing the occasional line, then
renaming the new file i_view64.ini. I now discover to my horror that the
default for the VBSÂ* CreateTextFile method is ANSI. So that's almost
certainly the reason for the strange behaviour. The .ini is getting
corrupted by this VBS script. Even thought it all still works fine, it
can't really be read with a text editor.

Deleting and renewing the .ini file and subsequently not editing it with
VBS has, it appears, resolved this issue.

I'd completely forgotten about this. So I must apologise for this wild
goose chase which was of my own making.



  #38  
Old June 21st 18, 12:21 AM posted to alt.comp.os.windows-10
Nil[_5_]
external usenet poster
 
Posts: 1,731
Default Reading an .ini file with Notepad using Windows 10

On 20 Jun 2018, Ken Blake wrote in
alt.comp.os.windows-10:

Although I agree with you, I also agree with Mayayana. It's way more
that the vast majority of users of any text editor needs.


I don't think that's what he's saying. He seems to be saying it's
little or no more useful than Windows Notepad. I think that's silly.

  #39  
Old June 21st 18, 12:57 AM posted to alt.comp.os.windows-10
Nil[_5_]
external usenet poster
 
Posts: 1,731
Default Reading an .ini file with Notepad using Windows 10

On 20 Jun 2018, "Mayayana" wrote in
alt.comp.os.windows-10:

You tell it your language, tell it the keywords and how strings
and comments are marked, and it colorcodes. Better than nothing,
but not really all that useful.


Windows Notepad, which you compare it to can't do that.

So most people who use any kind of coding language
are going to want an editor built to accommodate it, rather than
an editor that can accomodate 50 languages but specializes in
none.


I use it for HTML and I find its color highlighting very useful.

What else can N++ do? Macros? Maybe you use them.


I do quite often.

Other features of Notepad++ that I use a lot

- Open file in Explorer
- Open file in cmd
- transfer file with ftp
- regular expression find and replace
- block editing
- encoding characters for html
- convert file to various encodings
- convert line terminators
- launch in any of several web browsers
- folding and hiding lines
- zoom with mouse scroll wheel
- bookmarks
- block commenting and uncommenting
- document map

.... and plenty of other nice things that Windows Notepad won't do for
me. And it's fast, free, and in active development.

I don't. Plugins? I haven't see anything compelling. View an HTML
file in a browser?


I use it all the time. And you can use multiple browsers.

Any decent HTML editor can do that plus a lot more that's specific
to HTML.


Windows Notepad, which you compare it to, can't do that.

Which is not to criticize. I think N++ is very solid.
But it's a general editor like many, many others.


Not like Windows Notepad.

I suspect the almost cultish fervor around this kind of editor
(emacs and vi would be in the same category) comes out of the same
view as people who swear by command line.


Somehow I knew you would somehow bring it around to that, like you
always do.

There's a slightly macho attitude. Mouse is for sissies.
Conveniences are for sissies. Intellisense? Sissy. Informative,
contextual tooltips? Sissy. Once you look at it that way, N++ is
as fancy as you can afford to get without being a sissy. I imagine
the fans like to think of themselves as driving a stick shift with
no carpeting; a pack of Marlboros rolled into their t-shirt
sleeve. The classic suburban savage. The romance of imagining
getting one's hands dirty.


You really go nuts over that topic. People use the command line
because it's handy and useful. Same for Notepad++. Same for vi, and
probably EMACS. All that attitude stuff you mention is in your head.
Could it possibly be that they find it conventing even though you
don't?

I look at it differently. Any convenience that saves repetition or
leaving the editor is welcome. I'm not concerned with being a
sissy, or not.


Your words betray you. You somehow always come back to the
implication that people who use tools you don't like do it to
prove... something. And yet you go on at length about how you would
never stoop to using those tools. It's almost like you're trying to
proove... something. Weird.
  #40  
Old June 21st 18, 02:07 AM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Reading an .ini file with Notepad using Windows 10

"Nil" wrote

| Any decent HTML editor can do that plus a lot more that's specific
| to HTML.
|
| Windows Notepad, which you compare it to, can't do that.
|

No, I'm comparing it to any other specialized editor.
I already said I think it's a nice product for plain text
and I use it with files that are too big for Notepad.

I don't use Notepad for anything but plain text. I don't
use N++ for anything but plain text. As an HTML editor
it has very little functionality.

| There's a slightly macho attitude. Mouse is for sissies.
| Conveniences are for sissies. Intellisense? Sissy. Informative,
| contextual tooltips? Sissy. Once you look at it that way, N++ is
| as fancy as you can afford to get without being a sissy. I imagine
| the fans like to think of themselves as driving a stick shift with
| no carpeting; a pack of Marlboros rolled into their t-shirt
| sleeve. The classic suburban savage. The romance of imagining
| getting one's hands dirty.
|
| You really go nuts over that topic.

No. The cultists go nuts. People don't just say
they like N++ or command line. They get worked
up about it. See Frank's post. I rest my case.
He might be joking, partially. But a lot of people
make the same joke. and they insist on using barebones
editors with little more than the mmost basic color
syntax highlighting when there are all sorts of other
products available.

If that were not a factor there would be no
logical reason for you to use N++ for HTML, or
for any other language, unless it's just an occasional
kind of thing. (For that matter, if you did a lot of coding
in any language it would make sense to pay for
something specialized. I don't think you'll find
many web designers using N++ or Emacs. They
use something like Dreamweaver.)

If it is the case that you only need slight
functionality because you only do occasional coding,
then N++ seems fine to me, as does just about
every other free editor that provides color syntax
highlighting for "dozens of languages".



  #41  
Old June 21st 18, 03:51 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Reading an .ini file with Notepad using Windows 10

malone wrote:
On 21-Jun-2018 7:30 am, Paul wrote:
Mayayana wrote:
"malone" wrote

| https://www.dropbox.com/s/3hpgu1fgxs...4_W10.ini?dl=0 (.ini
| file created by Irfanview on the misbehaving Windows 10 machine)

What a mess. It looks like maybe you tried to edit it with
a program that didn't recognize unicode properly. Or maybe
you accidentally saved it as ANSI? Or maybe you tried to
edit it in a complex editor like Word and that misinterpreted
characters? The reason I say that is because, in addition to
the glitch with returns that Paul mentioned, part of the file
is actually ANSI. It's just not visible when the file is opened
as unicode. Starting with [WinPosition] it turns to ANSI.
That made me think that a special-use editor that sees [ as
a key character might be able to do the damage I see.

Maybe try just deleting it. IV should create a new copy.

Also, for what it's worth: Dropbox URLs that end with
"dl=0" can be turned into direct file links by switching it
to "dl=1". dl stands for "download". With dl=0 you have to
load the webpage and must have script enabled. With
dl=1 you get a download dialogue directly.


I had another thought, after looking at the *end* of
the i_view64_W10.ini .

The text at the top of the file uses double-byte characters.

The text at the bottom uses single-byte characters.

Even if the /b binary handling switch was used in a "copy"
concatenation command like the following, it's not likely
that a unicode file concatenated to a normal ASCII file,
would be "correct" when stored as out.txt. But this almost
looks like what was attempted. The first command
would work, if copy was well designed to analyze all
files and select the "correct" representation. Maybe
the "type" command would be better for this, but mixing
file types is just a bad idea.

copy file1.txt+file2.txt out.txt # bad if mixing Unicode
and ANSI

copy /b file1.txt+file2.txt out.txt # still bad, will look
weird
# at the end

With the hex editor, look at offset 0x3CA0 in i_view64_W10.ini,
and you can see where the funny bit happens. Whatever "process"
did that, likely also modified line ending characters,
messing up double byte CR and LF and making unknown
Unicode character blocks appear.

I could understand to some extent, the possibility
of this happening if you multi-booted. And edited
from some other OS. How it got that way though,
is pretty mysterious. I think the visual disturbance
is caused by the line endings, but the single-byte
characters at the end look like an attempt at
concatenation.

Paul


Right. I think I've discovered the problem.

Many years ago I wrote a VBScript to collect various images and then run
a slideshow using Irfanview. This gets run several times a day - and
only on this "misbehaving" W10 computer. As part of that script I
modified the Irfanview .ini file programatically - copying the contents
of i_view64.ini into another file changing the occasional line, then
renaming the new file i_view64.ini. I now discover to my horror that the
default for the VBS CreateTextFile method is ANSI. So that's almost
certainly the reason for the strange behaviour. The .ini is getting
corrupted by this VBS script. Even thought it all still works fine, it
can't really be read with a text editor.

Deleting and renewing the .ini file and subsequently not editing it with
VBS has, it appears, resolved this issue.

I'd completely forgotten about this. So I must apologise for this wild
goose chase which was of my own making.


I would claim the root cause, is computers are
too complex :-) I probably wouldn't have thought of
Unicode skulking in the corners, waiting to jump out
like that either.

Paul
  #42  
Old June 21st 18, 04:45 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Reading an .ini file with Notepad using Windows 10

Mayayana wrote:
"Chris" wrote

|
| Plus, does notepad still have a ridiculously small file size limit?
|

I don't know about limit. If it's more than 64K
characters then it's probably 4B characters.
But it takes a very long time to load a big file.
I don't know why. That's what made me get N++.


Have you tried the Windows 10 version of Notepad ?

It opened a 923,999,923 byte text file, using
about 1.8GB of RAM in Task Manager. I didn't time
how long that took, and it took enough time
I walked away.

I did a Replace All, and changed a word in each
of 12 million lines of text, and it took maybe
ten seconds. The RAM zoomed up to around 3.5GB
or so and stayed there, in the process.

It's not quite the same Notepad, at least
in Win10 17134.112 or so.

I'm just glad they fixed the Replace function,
was a looping, broken disaster area in other
versions of Windows.

It won't take too much more than the 900MB file.
I didn't binary search to get an exact value.
All I know is, a file twice that size, was rejected
as "too much". The system had maybe 9GB free RAM
at the time of the test, and I think the larger
test file would have fit, given a chance.

And using double the RAM like that when loading
the file, isn't bad when you consider the
internal storage for the file would be Unicode
(double byte characters).

Notepad is a bit better than it used to be.

I never thought I'd see the day when the
Notepad Replace function would work properly.

Paul
  #43  
Old June 21st 18, 02:02 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default Reading an .ini file with Notepad using Windows 10

Char Jackson wrote:
On 20 Jun 2018 14:46:26 GMT, Frank Slootweg
wrote:

Chris wrote:
[...]

Notepad++ is always the right solution


Notepad[++] is for WIMPs. Real Men (TM) use vi[m](1)!


WIMP - Windows Interface with Mouse Pointer? Windows Interface
Manipulation Program?


:-)

[In the off chance that you really don't know:
Windows Icons Mice Pull-down menus.
(For example https://www.google.com/search?&q=define+WIMP)]
  #44  
Old June 21st 18, 02:05 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default Reading an .ini file with Notepad using Windows 10

Mayayana wrote:
[...]
No. The cultists go nuts. People don't just say
they like N++ or command line. They get worked
up about it. See Frank's post. I rest my case.
He might be joking, partially.


Rest assured that I was joking, fully!
  #45  
Old June 21st 18, 02:13 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default Reading an .ini file with Notepad using Windows 10

Chris wrote:
Frank Slootweg wrote:
Chris wrote:
[...]

Notepad++ is always the right solution


Notepad[++] is for WIMPs. Real Men (TM) use vi[m](1)!


In other OSes I agree with you. In windows it just feels like a contortion.


Yeah. For historical (hysterical?) reasons, I mostly use 'Command
Prompt' windows and Cygwin (Linux-like) tools. In that environment,
vi/vim is nice, if you're used to it. But I wouldn't recommend vi/vim to
Windows users who are not used to it.

So also this article is composed in vim and then posted with tin, a
CUI newsreader.
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 03:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.