Other applications can read/write to an ini file in ascii or UTF16 (UCS2) encoding.
What's the point of adding an encoding parameter that only supports UTF8?
Function OpenPreference() without this parameter supports UTF8.
My questions about ReadPreferenceString are:
What exactly are the Encoding parameter as of PB6.10?
How does the Linux version differ from the Windows version?
In PB 4.30 and previous versions, when selecting the ascii subsystem, preference lib works correctly with ascii ini files.
But after remains to unicode only (PB 4.40), ini files in ascii encoding are unreadable.
Ascii behaves the same way than before (ie: ini file without BOM). The new encoding parameter is only to allow to load ini whithout BOM in UTF-8 mode. Doc will be updated.
Fred wrote: Tue Jan 16, 2024 8:35 amThe new encoding parameter is only to allow to load ini whithout BOM in UTF-8 mode. Doc will be updated.
Other applications save data not only in UTF-8, but also in ASCII and UTF-16 encodings and in this case, the Preference library is useless, because it cannot read/save in encodings other than UTF-8.
But then why do we need flag #PB_Preference_NoBOM if function CreatePreferences() saves with BOM?
In any case, if this is a PB-only library, there is no need for #PB_Preference_NoBOM.
User_Russian wrote: Tue Jan 16, 2024 11:26 am
But then why do we need flag #PB_Preference_NoBOM if function CreatePreferences() saves with BOM?
In any case, if this is a PB-only library, there is no need for #PB_Preference_NoBOM.
User_Russian wrote: Tue Jan 16, 2024 11:26 am
But then why do we need flag #PB_Preference_NoBOM if function CreatePreferences() saves with BOM?
In any case, if this is a PB-only library, there is no need for #PB_Preference_NoBOM.