Pablo,Pablo César wrote:Now in HMG UNICODE version, recently I have found some troubles in INI files when is be written. I mean when I use "SET" with variables which contains UNICODE format. If I open INI file with Notepad++, I see that file was written in ANSI mode.
Dear Claudio, do you think this it would be an error or I shall convert all my INI_variables to ANSI mode ?
I have noted in C:\hmg.3.1.4\SOURCE\INI\c_ini.c and C:\hmg.3.1.4\SOURCE\INI\h_ini.prg those are using WritePrivaeProfileString and probably (please confirm) shall be used WritePrivateProfileStringW in place of that.
Or could be the problem in xChar Function at C:\hmg.3.1.4\SOURCE\INI\h_ini.prg, when need to convert UNICODE/ANSI ?
When you compile in Unicode the compiler automatically calls the function that supports Unicode (name ending in W).
I think the problem is here (h_ini.prg):
Code: Select all
If ! File( cIniFile )
hFile := FCreate( cIniFile )
Else
hFile := FOpen( cIniFile, FO_READ + FO_SHARED )
EndIf
If the file was created using Unicode characters, WritePrivateProfileString() function writes Unicode characters to the file. Otherwise, WritePrivateProfileString() writes ANSI characters.
I will try to correct.
PS: Please, create an ini file in Unicode with Notepat++ and try write/read Unicode text to see if it works.