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.
IniRead suggestion
Re: IniRead suggestion
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.
Re: IniRead suggestion
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.
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.
Return to “Suggestions on Documentation Improvements”
Who is online
Users browsing this forum: No registered users and 16 guests