Page 1 of 1

[PB 6.10 beta 4] WriteString breaks file encoding in IDE?

Posted: Tue Jan 30, 2024 12:59 pm
by Joubarbe
Probably a bug with the IDE more than encoding, as Notepad++ always properly detects that the file is UTF-8 in the following examples.

Code: Select all

CreateFile(0, "PureBasicFile.pb", #PB_File_SharedRead | #PB_File_SharedWrite | #PB_UTF8)
The file format is recognised as UTF-8. If I type Alt 196, I have ─.

Code: Select all

CreateFile(0, "PureBasicFile.pb", #PB_File_SharedRead | #PB_File_SharedWrite | #PB_UTF8)
WriteString(0, "This is text.", #PB_UTF8)
The file format is recognised as "plain text". If I type Alt 196, I have -.

Re: [PB 6.10 beta 4] WriteString breaks file encoding in IDE?

Posted: Tue Jan 30, 2024 1:04 pm
by Fred
The IDE needs an UTF8 BOM to handle UTF-8 files. It doesn't do live UTF-8 detection like notepad++.