PB 6.10 b1 - OpenPreference()

Just starting out? Need help? Post your questions and find answers here.
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: PB 6.10 b1 - OpenPreference()

Post by AZJIO »

User_Russian wrote: Tue Jan 16, 2024 4:22 pm File functions support required encodings (#PB_Ascii, #PB_UTF8 and #PB_Unicode).
#PB_Ascii in Linux does not use Russian, there is something like 1252 or some ISO-8859

When I tried to write a program to search and replace text in Linux, I encountered the problem that it was impossible to perform text replacement in ANSI Windows-1251 files, since the algorithm does not see Russian texts in it.
https://www.purebasic.fr/english/viewto ... 35#p611235
User_Russian
Addict
Addict
Posts: 1518
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PB 6.10 b1 - OpenPreference()

Post by User_Russian »

#PB_Ascii in Linux
This topic was created in the Windows section. Then move it to another section.
Windows is localized for each language and the text in ascii is displayed correctly.
Linux does not have localization for languages.
User_Russian
Addict
Addict
Posts: 1518
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PB 6.10 b1 - OpenPreference()

Post by User_Russian »

In PB 6.10 beta 4, in the function description OpenPreferences(), it is written
Encoding (optional)

To force a string encoding when reading the preference file. If an UTF-8 BOM is found in at the start of the file, this parameter is ignored and UTF-8 will be used. It can be one of the following value:

#PB_UTF8
#PB_Ascii
But using #PB_Ascii text in Ascii encoding is not readable.
Then what is option #PB_Ascii?
Post Reply