PureBasic 4.00 - Beta 7
PureBasic 4.00 - Beta 7
Hi there,
Another beta is available on your personal account, and brings the usual bug fixes and few new things:
- The compiler and IDE now support UTF-8 files using the 'BOM' header, which allows to mix ascii and UTF-8 files in the same projects. It's now possible to use UTF-8 files to compile non unicode executable as well, so all is simplified and you shouldn't have to worry again about the file format. A new combobox is available in the 'Compiler option' window to set the file type. When switching between utf-8 and ascii, the text in the IDE is no more corrupted.
- ReadStringFormat() and WriteStringFormat() has been added, to support BOM in the string library (check the doc for more infos)
- StringByteLength() to calculate the needed length of a string in the different encoding supported by PureBasic.
Have fun,
The Fantaisie Software Team.
Another beta is available on your personal account, and brings the usual bug fixes and few new things:
- The compiler and IDE now support UTF-8 files using the 'BOM' header, which allows to mix ascii and UTF-8 files in the same projects. It's now possible to use UTF-8 files to compile non unicode executable as well, so all is simplified and you shouldn't have to worry again about the file format. A new combobox is available in the 'Compiler option' window to set the file type. When switching between utf-8 and ascii, the text in the IDE is no more corrupted.
- ReadStringFormat() and WriteStringFormat() has been added, to support BOM in the string library (check the doc for more infos)
- StringByteLength() to calculate the needed length of a string in the different encoding supported by PureBasic.
Have fun,
The Fantaisie Software Team.
Last edited by Fred on Wed Mar 29, 2006 1:38 am, edited 1 time in total.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
download link is broken! [fixed now thanks]
Last edited by netmaestro on Thu Mar 16, 2006 1:33 am, edited 1 time in total.
BERESHEIT
One note:
The IDE now uses the UTF-8 BOM header to detect when a file is UTF-8 or not.
Since all old sources do not have that, they will be initially considered Ascii
files and loaded as such.
If you have many sources edited with the old UTF-8 switch in the IDE, you should
probably add the header (bytes EF BB BF at the start of the file) manually
so they are directly detected as UTF-8.
(this can be done easily with a small program using the new WriteStringFormat() command if there are many sources to do
)
Another change is that OpenWindow() now only uses #PB_Window_SystemMenu if
no flags were specified (there was some discussion about it in the german forum and it seemed more logical)
Also you can use #PB_Ignore for x/y parameters, which will let windows choose
the position for your window.
The IDE now uses the UTF-8 BOM header to detect when a file is UTF-8 or not.
Since all old sources do not have that, they will be initially considered Ascii
files and loaded as such.
If you have many sources edited with the old UTF-8 switch in the IDE, you should
probably add the header (bytes EF BB BF at the start of the file) manually
so they are directly detected as UTF-8.
(this can be done easily with a small program using the new WriteStringFormat() command if there are many sources to do

Another change is that OpenWindow() now only uses #PB_Window_SystemMenu if
no flags were specified (there was some discussion about it in the german forum and it seemed more logical)
Also you can use #PB_Ignore for x/y parameters, which will let windows choose
the position for your window.
quidquid Latine dictum sit altum videtur
> OpenWindow() now only uses #PB_Window_SystemMenu if no flags were specified
Good idea, but #PB_Window_SystemMenu|#PB_Window_ScreenCentered
would be nicer, because it would make testing an app quicker because you
know where the window will open every time, instead of being random.
Good idea, but #PB_Window_SystemMenu|#PB_Window_ScreenCentered
would be nicer, because it would make testing an app quicker because you
know where the window will open every time, instead of being random.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Well, the same thought was why we originally had it this way. But think about itPB wrote:> OpenWindow() now only uses #PB_Window_SystemMenu if no flags were specified
Good idea, but #PB_Window_SystemMenu|#PB_Window_ScreenCentered
would be nicer, because it would make testing an app quicker because you
know where the window will open every time, instead of being random.
for a while... isn't it odd to have an x/y parameter that gets ignored by default ? (why isn't the x/y the optional thing then?)
It just makes more sense this way.
And btw, opening the window at fixed x/y of 100x100, you will also know where the window is every time

quidquid Latine dictum sit altum videtur
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
> isn't it odd to have an x/y parameter that gets ignored by default ?
Yeah, but I was thinking for when X/Y is ignored. I hate how Windows opens
windows at random positions (eg. Calculator, Properties of files, etc). I ended
up writing an app to open them where I want every time and my productivity
has increased as a result, because I can go directly to them (and the gadgets
on them) without thinking -- especially when working with macro apps.
> btw, opening the window at fixed x/y of 100x100, you will also know
> where the window is every time
I know -- check out most of my tips here and you'll see me doing that.
Yeah, but I was thinking for when X/Y is ignored. I hate how Windows opens
windows at random positions (eg. Calculator, Properties of files, etc). I ended
up writing an app to open them where I want every time and my productivity
has increased as a result, because I can go directly to them (and the gadgets
on them) without thinking -- especially when working with macro apps.
> btw, opening the window at fixed x/y of 100x100, you will also know
> where the window is every time

I know -- check out most of my tips here and you'll see me doing that.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Enthusiast
- Posts: 537
- Joined: Wed Oct 29, 2003 10:35 am
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact: