IniRead suggestion

Share your ideas as to how the documentation can be improved.
tempuser
Posts: 12
Joined: 30 Jan 2018, 17:37

IniRead suggestion

Post by tempuser » 24 Nov 2020, 11:15

My suggestion is to add to "Remarks" in IniRead help that common error could be UTF coding in INI file, what an example is a cause in this thread: https://www.autohotkey.com/boards/viewtopic.php?t=55308

Recently takes me about 2 hours of fighting with ahk code until finally I start to google and found above thread, changed INI file to ANSI and solve errors in IniRead command instantly.

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: IniRead suggestion

Post by swagfag » 24 Nov 2020, 11:47

this has already been documented
remarks wrote:https://www.autohotkey.com/docs/commands/IniRead.htm#Remarks
Unicode: IniRead and IniWrite rely on the external functions GetPrivateProfileString and WritePrivateProfileString to read and write values. These functions support Unicode only in UTF-16 files; all other files are assumed to use the system's default ANSI code page.

tempuser
Posts: 12
Joined: 30 Jan 2018, 17:37

Re: IniRead suggestion

Post by tempuser » 27 Nov 2020, 07:08

Indeed. I'm not perceive it earlier.

So to emphasise maybe change it to something like this? (may contain grammar errors):

Unicode: IniRead and IniWrite rely on the external functions GetPrivateProfileString¬ and WritePrivateProfileString¬ to read and write values.
Note: These functions support Unicode only in UTF-16 files; all other files are assumed to use the system's default ANSI code page. Otherwise these functions may not function properly.

Post Reply

Return to “Suggestions on Documentation Improvements”