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

Just starting out? Need help? Post your questions and find answers here.
Joubarbe
Enthusiast
Enthusiast
Posts: 714
Joined: Wed Sep 18, 2013 11:54 am
Location: France

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

Post 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 -.
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

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

Post by Fred »

The IDE needs an UTF8 BOM to handle UTF-8 files. It doesn't do live UTF-8 detection like notepad++.
Post Reply