Fail to read wincmd.ini in UTF8+BOM while TC is starting.

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Post Reply
jfshy
New Member
New Member
Posts: 1
Joined: 2016-03-14, 02:30 UTC

Fail to read wincmd.ini in UTF8+BOM while TC is starting.

Post by *jfshy » 2016-03-14, 04:35 UTC

I have tried to make a portable TC with the config UseIniInProgramDir=7 in wincmd.ini, but if the ini file is in UTF8+BOM, in fact I have just edit it and save the wincmd.ini file with Windows Notepad, then while TC starting, TC can not recognize UseIniInProgramDir=7 correctly.

Steps to reproduce this bug:
1. search Windows Registry to export then delete wincmd.ini info, to make sure TC will not get ini location info from Registry.
2. Open wincmd.ini in TC folder with EverEdit (3rd party tool easy to check file coding), found the ini file is coded in UTF8.
3. Then edit the wincmd.ini with Windows Notepad (mostly used text editor), add UseIniInProgramDir=7, then save it.
4. Open the wincmd.ini with EverEdit, found the ini file now is code in UTF8+BOM after saved with Windows Notepad.
5. Start TC, now TC will no read the in-folder customized ini file, TC created a new ini file in C:\Users\Admin\AppData\Roaming\GHISLER\, with all default settings. --> that is the bug.
6. Close TC.
7. Inport oringinal REG file (backed up in step1) to indicate TC to use in-folder ini again.
8. Start TC, TC will use the in-folder ini, change some settings in TC, and looks like it work normally with the in-folder ini. That means after TC started, TC also can work with wincmd.ini in UTF8+BOM correctly.
9. Close TC.
10. Clean ini location info in Registry again.
11. Change in-folder wincmd.ini from UTF8+BOM to UTF8 in EverEdit tool.
12. Start TC, now TC can recognize UseIniInProgramDir=7 and use in-folder ini correctly.

User avatar
MVV
Power Member
Power Member
Posts: 8244
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2016-03-14, 07:09 UTC

You simply can't have UTF-8 INI, this encoding is not supported by Windows INI files. You must use ANSI or UTF-16 here.

Post Reply