View Single Post
  #3  
Old June 15th 18, 05:13 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:

I use Irfanview a lot and sometimes I need to view or edit the
i_view.ini file. Using Windows 8 and earlier this was easy. Just open it
with Notepad, make the edits if necessary, save and close it and
everything works fine.

Things are a bit different using Windows 10. Opening the i_view64.ini
file one sees a mass of what look like Chinese characters. Despite the
font being set at Consolas Regular which is the default for Notepad.

Opening the i_view64.ini file created on the Windows 10 machine on a
Windows 8 machine and it's all Chinese
Opening the i_view64.ini file created on the Windows 8 machine on a
Windows 10 machine and it's all ok.

Both computers are using the most recent version of Irfanview (4.51 64
bit). Winver 1709

Can anyone explain this rather strange behaviour? And, even, could
anyone using Irfanview with Windows 10 have a quick look and see whether
you can read the .ini file opened with notepad?


You can get a very nice hex editor here.

https://mh-nexus.de/en/hxd/

Open the hdx.exe program window. Drag and
drop the i_view.ini text file on the open blank
HXD window, for a look.

Text files have various "encodings".

You'll notice the Notepad "Save As" has four
options for saving a text file. UTF-8 is one
of them.

If UTF-8 was selected, there might be an extra
few bytes at the beginning of the file. That's
called the BOM. The BOM may indicate whether the
file was stored little endian or big endian, amongst
other possibilities.

"For example, the data [EF BB BF 41 42 43] could either be:

The legitimate ISO-8859-1 string "ABC"
The legitimate UTF-8 string "ABC"
"

Notice that the hex values like EF

1110 1111 binary 0xEF
1011 1011 binary 0xBB
1011 1111 binary 0xBF

^
|
+--- MSB is set to one, so "it's not ASCII" in a sense

That's a hint something funny is going on, when the MSB is
set on bytes in the text file like that.

When a file is mis-interpreted, it's likely "escaped"
from ANSI or ASCII or the more familiar older formats.

I examined my i_view.ini file here with HXD and
there is nothing goofy. No BOM bytes. Just plain ole
ASCII (41 42 43 etc). So some editor you used, at some point,
has pulled a fast one and messed with the beginning
bytes.

*******

If you have Bash shell set up (Win10 has a flavor of
command line Ubuntu installed from the Windows Store),
you can try this command

cd directory_with_file # change directory to
# where i_view.ini is located
file i_view.ini

and the file command can indicate one of *one hundred*
flavors of text files. That's how many detectable variants
there are. Such a command may hint at the file type,
which is text, but is buggered. And the format will have
a name. And that name will be a hint, a breadcrumb to be
Googled.

There was a reference to some "improvement" lately in
Notepad, but I can't find a reference to it now. Whether
that has something to do with it, dunno. I just tested
Notepad on 17134.xxx and it was fine.

Paul
Ads