[PB5.20LTS]
If compiling in Unicode mode and a file is written, a BOM is automatically inserted - this really should not happen as many apps do not recognise BOM (it's use is commonplace, but not a standard). So, please let the developer decide whether or not a BOM should be written (as we can with WriteStringFormat()).
Related to No BOM Detected http://www.purebasic.fr/english/viewtop ... 13&t=55125
Related to BOM and ReadString http://www.purebasic.fr/english/viewtop ... 13&t=55484
Automatic BOM
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Automatic BOM
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Automatic BOM
I can't confirm that. It does not happen here with PB 5.20 LTS 32-bit on Windows XP 32-bit.IdeasVacuum wrote:[PB5.20LTS]
If compiling in Unicode mode and a file is written, a BOM is automatically inserted
This is my test code (compiled in Unicode mode):
Code: Select all
If CreateFile(0, "D:\Data\LJ\Desktop\Text.txt")
WriteString(0, "Hello world!")
CloseFile(0)
EndIf
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Automatic BOM
You are right Little John, with that code snippet all is well. I will have to go back to the code that revealed the issue. With reference to the other posts I linked to, I do think this is an area that needs a bit of attention.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Automatic BOM
Yes, please post (the decisive part of) that code here.IdeasVacuum wrote:You are right Little John, with that code snippet all is well. I will have to go back to the code that revealed the issue.