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. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
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? |
Ads |
#2
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 6/14/2018 10:09 PM, 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? It could just be a difference between the fonts in use on the two machines or rather one might be missing. Open a copy of both versions of notepad. Note that I did not say to open the ini file yet. Left click on Format and then click on Font. You want both to have the same Font, like Consolas, and Script settings, as in Western. Now open both .ini files and see if they both look normal. If not, copy the .ini file from the one that looks normal to a flash drive. Then on the W10 machine see if notepad can open the file on the flash drive and if it looks normal. If it does try reversing the proceedure, as in copy the garbled .ini to the flash drive and see if the W7 machine can open it cleanly. |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 14 Jun 2018, malone wrote in
alt.comp.os.windows-10: 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? I only have 32-bit Windows 10, but i_view32.ini is a perfectly normal text file, although my text editor Notepad++ says that its character encoding is "UCS2-LE BOM", which is some sort of Unicode that I'm not familiar with. Windows Notepad still displays it just fine. Same story on my 64-bit Windows 7 machine. I wonder if your file is corrupt and has become cross-linked with a binary file? What's the file size of your ini file? It should be about 20 - 25 K. If it isn't, something is wrong with it. |
#5
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
Nil wrote:
On 14 Jun 2018, malone wrote in alt.comp.os.windows-10: 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? I only have 32-bit Windows 10, but i_view32.ini is a perfectly normal text file, although my text editor Notepad++ says that its character encoding is "UCS2-LE BOM", which is some sort of Unicode that I'm not familiar with. Windows Notepad still displays it just fine. Same story on my 64-bit Windows 7 machine. I wonder if your file is corrupt and has become cross-linked with a binary file? What's the file size of your ini file? It should be about 20 - 25 K. If it isn't, something is wrong with it. http://docs.notepad-plus-plus.org/in...Little_Endian: "In UCS-2 Little Endian: The header is the sequence FFFE, which represents the character 0xFEFF (BOM), with the Least Significant Byte, written FIRST. Every valid Unicode character, with code-point = \xFFFF, is coded with TWO bytes. The FIRST byte stored is the Least Significant Byte of each sequence of two bytes, so the three characters of the test file, are stored : 41 00 , B0 00 , 19 20 " Which suggests with a hex editor, you might see the BOM. Or, it might not be there. On an older OS and copy of Notepad, the BOM will become visible as squares or black dots or some other representation. Whereas Win10 Notepad/Wordpad might not show the BOM, because it's "interpreting" those bytes, instead of displaying them. This is why I dig out the copy of HxD, as it's an honest display tool that just displays stuff. It will show the FF FE or whatever. ******* Once you see bytes like that, don't panic. You can't "cure" the problem by simply deleting any BOM you find. The damage in a sense, is already done. In the UCS-2 LE case, text characters are stored as 16 bit values. For an English speaker, typically the second byte is always zero. The Windows Registry uses a representation like that, in order to deal with localization in other languages. As long as one of the system text editors (Notepad or Wordpad) can correctly input the BOM and message, by using Save As, you should be able to re-encode the file to a better choice. Even with "Chinese looking letters", the file isn't dead yet. But you need that BOM info to figure it out. Paul |
#6
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
malone wrote:
Opening the i_view64.ini file one sees a mass of what look like Chinese characters. Can anyone explain this rather strange behaviour? Sounds like something has converted the file to unicode but left out the byte order marks; try manually setting the encoding in notepad's file/open dialog rather than double-clicking the file to open it. |
#7
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 2018-06-15 16:35, “😵 Good Guy 😵†wrote:
What has Irfanview got to do with Notepad?Â* IrfanView creates a binary file while Notepad reads and writes text files. Irfanview stores its settings in a .ini file (i_view.ini). Irfanview's ..ini file can be edited with Notepad. That should be obvious. Repeating slowly for “😵 Good Guy 😵†… * Irfanview stores its settings in a .ini file (i_view.ini). * Irfanview's .ini file can be edited with Notepad. .ini files are text files so you need to tell us how are you opening the file?Â* The correct way is to right-click on the file and choose "Open With" and from the list of Apps select Notepad. In this case, the OP should use Notepad's file|open and *manually* select the correct encoding. Notepad is not automatically detecting the correct encoding. This is evident because the .ini file contents looked like Chinese in Notepad. Repeating slowly for “😵 Good Guy 😵†… * The OP should use Notepad's file|open and *manually* select the correct encoding, because… * Notepad is not automatically detecting the correct encoding. o This is evident because the .ini file contents looked like Chinese in Notepad. -- With less than 50% of Windows desktops running Windows 10, customer satisfaction has problems competing with previous versions of Windows. |
#8
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On Fri, 15 Jun 2018 15:09:37 +1200, 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? In regard to your query, I have the same software on my PC and I can open i_view.ini in Notepad without any problem. I prefer to use NoteTab instead of Notepad and I don't have any problem opening i_view64.ini with NoteTab Light, which is a free program available from www.notetab.com. |
#9
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 15 Jun 2018, Monty wrote in
alt.comp.os.windows-10: In regard to your query, I have the same software on my PC and I can open i_view.ini in Notepad without any problem. I've opened that INI file on several different computers and with several different text editors/viewers and nothing acts out of the ordinary. Irfanview does caution you, via a comment in the file, that the INI file is Unicode encoded, but otherwise it's straight text, no binary information in there. I'd say there's something peculiar about his system, that it's not a general Windows 10 issue. |
#10
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 16-Jun-2018 5:00 pm, Nil wrote:
On 15 Jun 2018, Monty wrote in alt.comp.os.windows-10: In regard to your query, I have the same software on my PC and I can open i_view.ini in Notepad without any problem. I've opened that INI file on several different computers and with several different text editors/viewers and nothing acts out of the ordinary. Irfanview does caution you, via a comment in the file, that the INI file is Unicode encoded, but otherwise it's straight text, no binary information in there. I'd say there's something peculiar about his system, that it's not a general Windows 10 issue. Yes. I think you're right. Since my original post I've found another Windows 10 computer with Irfanview and the .ini file on that reads perfectly ok. I've also used several other text readers with consistent results so it's nothing to do with Notepad. Thanks everyone for all the other helpful information. It's really useful as I'll need to try to work out why this particular Windows 10 computer exhibits this strange behaviour. |
#11
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
malone wrote:
On 16-Jun-2018 5:00 pm, Nil wrote: On 15 Jun 2018, Monty wrote in alt.comp.os.windows-10: In regard to your query, I have the same software on my PC and I can open i_view.ini in Notepad without any problem. I've opened that INI file on several different computers and with several different text editors/viewers and nothing acts out of the ordinary. Irfanview does caution you, via a comment in the file, that the INI file is Unicode encoded, but otherwise it's straight text, no binary information in there. I'd say there's something peculiar about his system, that it's not a general Windows 10 issue. Yes. I think you're right. Since my original post I've found another Windows 10 computer with Irfanview and the .ini file on that reads perfectly ok. I've also used several other text readers with consistent results so it's nothing to do with Notepad. Thanks everyone for all the other helpful information. It's really useful as I'll need to try to work out why this particular Windows 10 computer exhibits this strange behaviour. I still think you should pick up a free hex editor. https://mh-nexus.de/en/hxd/ It will give you a chance to see what is really inside that file. And you won't even need to scroll the display, as the "interesting bit" of that file is at the very beginning. What you want to observe, is whether the file has a BOM at the beginning, and whether the BOM is a well known one. This amounts to only a few bytes of hex, which you can Google with the word "BOM". You may be able to decode the "intentions" of what was done that way. The bytes that come after that, might be single characters next to one another. If every second byte is 0x00, then that suggests 16-bit character representations (which Windows likes because it supports foreign languages). Even the registry contents, when you see what looks like a "binary" string, in fact it's just 16-bit text in disguise. Using the hex editor, you can learn more about your prey. The system locale or language choice, might make a difference if the BOM was missing, and some editor was trying to "guess" what to do, by using the current locale declaration to try to make the file viewable. That's about the only other idea I can think of. I'm not really good with this locale/internationalization stuff. Paul |
#12
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
"malone" wrote
| Thanks everyone for all the other helpful information. It's really | useful as I'll need to try to work out why this particular Windows 10 | computer exhibits this strange behaviour. You might check the settings, if Notepad-Win10 has them. Paul has mentioned the byte order mark, but that's not a required element in unicode. In other words, text editors must sometimes guess at the encoding. So Notepad may be set for a "default guess" of ANSI, which would interpret each byte according to the default codepage on your system. (Presumably English.) Long story short, in the beginning all we needed was English. We did that with 1/2 byte, but usually these days 1 byte is used. That's ASCII text. 65 = A. 97 = a. Very simple. Then other languages became relevant. We came up with ANSI. Bytes 0-127 stayed the same, but 128 to 255 are interpreted according to the local codepage. If your computer is set for English then 65 is A and 169 is a copyright symbol (with most fonts). In Russian or Turkish, 65 is still A but 169 will be something else. But it's all still 1 byte = 1 character. Except for Chinese, Japanese and Korean, it was sort of universal. Eventually, it became clear that all languages would need to be accommodated fully, which would require at least 2 bytes for each character. So unicode was born. The first 128 bytes of unicode are still a match for ASCII, but now each character is 2 bytes, so the bytes have to be interpreted in a fundamentally different way. It's no longer 1 byte = 1 character. Unlike ANSI, it can't be shoehorned into existing systems. To complicate things, unicode can mean different things. On Windows it generally refers to unicode2, AKA unicode16, in which each character is represented by 2 bytes instead of one. With English or western European languages that usually means every other byte is zero, a null character, because the first 128 bytes of unicode are the same as ASCII, which covers all necessary English characters and most French, Spanish, etc. (Remember that bytes are just numbers, so at the basic level every character is represented by a number.) Example: "abc" In ASCII or ANSI, if you save that in Notepad and look at it in a hex editor, you'll see 61-62-63. 3 bytes. Those are the hexadecimal equivalents of 97-98-99, which are the byte values that represent a-b-c. If the same file is saved as unicode, on Windows it will be "little endian" unicode16. That means it will read, in a hex editor, as 61-00-62-00-63-00. It may or may not be prepended by the BOM that Paul explained. Like so many things with computers, things have developed so fast that a lot of "standards" are really seat-of-the-pants solutions. Unicode also, increasingly, refers to UTF-8, which is a form of unicode that doesn't require using null characters. (Unicode just refers to universal encoding, having unique values for each character, as opposed to codepages used for ANSI text.) UTF-8 uses 1-4 bytes per character, depending on the language. For English it's identical to ASCII. So UTF-8 can be shoehorned into the existing system, at least for English speakers, because it's the same thing. Bytes 1-127 match ASCII bytes. UTF-8 has become popular because unicode2/16, with its null bytes, requires a different interpretation of text. For ASCII/ANSI text, which has been standard for decades, 1 byte = 1 character. A null byte signals the end of a text string. So with UTF-8, most existing webpages and text files don't have to be rewritten in order to conform. UTF-8 is now probably more common than English codepage for webpages. I think it's also now standard for text files on Linux. If you've ever download a webpage and found that it contains weird characters like capital A with an umlaut then you're looking at UTF-8 that is *essentially* ASCII with a sprinkling of UTF-8 characters, which has been rendered as ANSI. Microsoft is a big one for doing that. They now write their English webpages with UTF-8 non-breaking-space characters and curly braces. Just enough UTF-8 to make a mess of what's functionally an ASCII-encoded webpage. I recently had to write code to distinguish an ASCII/ANSI webpage from UTF-8. It can be a complicated task. And UTF-8 does not normally have any file marker. (Though there is a way to signify it in HTML.) What all this means is that there are several ways to interpret byte streams as text but there's no foolproof system to disambiguate between them. |
#13
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 15/06/2018 05:09, 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? Recently I installed Irfanview (64b, most recent version) on Windows 10 64b Pro. I like it! No problem to open its ini file by Notepad, Wordpad or Textpad. Fokke |
#14
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
"Fokke Nauta" wrote
| Recently I installed Irfanview (64b, most recent version) on Windows 10 | 64b Pro. I like it! | No problem to open its ini file by Notepad, Wordpad or Textpad. | But the INI is unicode, which it didn't used to be. Though that still doesn't explain why his version of Notepad didn't recognize it. My XP version of Notepad sees it fine. |
#15
|
|||
|
|||
Reading an .ini file with Notepad using Windows 10
On 16/06/2018 22:56, Mayayana wrote:
"Fokke Nauta" wrote | Recently I installed Irfanview (64b, most recent version) on Windows 10 | 64b Pro. I like it! | No problem to open its ini file by Notepad, Wordpad or Textpad. | But the INI is unicode, which it didn't used to be. Though that still doesn't explain why his version of Notepad didn't recognize it. My XP version of Notepad sees it fine. That's really weird indeed. Perhaps an hex editor will show what's in it as Paul suggested? Fokke |
Thread Tools | |
Display Modes | Rate This Thread |
|
|