No Ascii?

Just starting out? Need help? Post your questions and find answers here.
Psych
Enthusiast
Enthusiast
Posts: 239
Joined: Thu Dec 18, 2008 3:35 pm
Location: Wales, UK

No Ascii?

Post by Psych »

Am I correct in assuming that as from 5.5 we have to use unicode strings?

Why have they done this? No kidding I have at least 6 sources that no longer work with this new version of PB. Now I have to go through everything and make ascii memory buffers? Wow, nice job.

What in earth was wrong with the old way when we could choose for ourselves?

Looks like I am stuck having to modify all my sources, or just never being able to upgrade from 5.4.

Unless of course somebody has a workaround for this?
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: No Ascii?

Post by RichAlgeni »

Read the release notes! There are a number of workarounds, including using 5.4x.
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: No Ascii?

Post by infratec »

Hi,

it's not so complicated to convert the code.
Many functions have now a flag to handle ASCII.
Only internal is all unicode now.

If you want to send something to a serial port or via network, you only have to apply the new flag.
Same for file I/O.

Bernd
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: No Ascii?

Post by helpy »

Psych wrote:Am I correct in assuming that as from 5.5 we have to use unicode strings?
This change was announced two years ago!

See ==> http://www.purebasic.fr/blog/?p=452 from August 9, 2014
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
sys64802
Enthusiast
Enthusiast
Posts: 105
Joined: Sat Sep 12, 2015 6:55 pm

Re: No Ascii?

Post by sys64802 »

Psych wrote: What in earth was wrong with the old way when we could choose for ourselves?
Nothing obviously.
Psych wrote: Why have they done this?
According to them:
What would change for us:

- Faster building time, less code in our source tree, makefiles much shorter
- Less bugs because of code reduction
- No more unicode switch, so it's easier when sharing code source on the forum, or when developping an user lib (everybody is unicode)
- Makes PB definitely more modern.

You may want to read the full thread while sipping some tea

http://www.purebasic.fr/english/viewtop ... 14&t=60171

It was sort of "proposed" there as you see, to hear people's opinion about it.
You should have posted your concerns in the forum at the time, everything would have been completely different you know :P
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: No Ascii?

Post by Justin »

All the set up was done, no one complained and it was a great feature it's been a bad decision to remove it.
DontTalkToMe
Enthusiast
Enthusiast
Posts: 334
Joined: Mon Feb 04, 2013 5:28 pm

Re: No Ascii?

Post by DontTalkToMe »

Justin wrote:no one complained
reading that thread is easy to see someone complained
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: No Ascii?

Post by Justin »

I have not read it but i think is plainly silly if someone complains about it. But the decision is made, i guess the complainers are very happy now.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: No Ascii?

Post by Tenaja »

I was unhappy at first, but honestly, it only took an hour or two to convert my x0,000 line project, and I see no disadvantages. It actually works better with external libraries now, because "nobody"* uses ascii anymore.

*"Nobody" means "Americans stuck in a rut" who do not share their code. Yes, that included me, but I jumped out of the rut because of PB's progress, and I'm happier for it.
DontTalkToMe
Enthusiast
Enthusiast
Posts: 334
Joined: Mon Feb 04, 2013 5:28 pm

Re: No Ascii?

Post by DontTalkToMe »

I have not read it but i think is plainly silly if someone complains about it
Now maybe, at the time no. If not then, then when ? The thread was depicted as an opportunity to speak against it.
i guess the complainers are very happy now.
I don't see how you can guess that.
They may not complain because they realized it's useless keep complaining, not because they are happy.
I have my arguments against removing ascii, but why I should mention them here and now ?
I would just waste energy.
But certainly I'm not happy about it.
Psych
Enthusiast
Enthusiast
Posts: 239
Joined: Thu Dec 18, 2008 3:35 pm
Location: Wales, UK

Re: No Ascii?

Post by Psych »

Quite correct.

Useless having an opinion about things we might consider to be a step backwards, and even more useless suggesting this after the fact, knowing full well nothing will ever change.

I guess I am just an advocate of not removing functionality, it wasn't broke, so why fix it?

I'll think twice before posting such opinions on a public forum for registered users.
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: No Ascii?

Post by netmaestro »

Complaints aren't discouraged around here, with this many users a consensus would be a rare thing. The team doesn't mind it at all as long as it doesn't turn abusive or rude. That's really a breath of fresh air compared to some coding forums out there. I think the main issue for them here is the extra overhead involved in maintaining two forks for PB internals when in this day and age one is sufficient.
BERESHEIT
Psych
Enthusiast
Enthusiast
Posts: 239
Joined: Thu Dec 18, 2008 3:35 pm
Location: Wales, UK

Re: No Ascii?

Post by Psych »

Agreed.

However wouldn't UTF8 be better as the standard? I mean, I haven't seen any real world applications that use unicode, although maybe I haven't been looking in the right places.

I am of course biased given the fact utf is just extended ascii, although I am sure you will agree that most web pages are encoded in utf, and utf has a far more extensible character set in terms of codepages (not being limited to 2 characters).

Anyway, it's good to have the discussion.
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: No Ascii?

Post by Demivec »

Psych wrote:However wouldn't UTF8 be better as the standard? I mean, I haven't seen any real world applications that use unicode, although maybe I haven't been looking in the right places.

I am of course biased given the fact utf is just extended ascii, although I am sure you will agree that most web pages are encoded in utf, and utf has a far more extensible character set in terms of code pages (not being limited to 2 characters).
It is important to understand that UTF-8 and PureBasic's 'unicode' (UCS-2) are both encodings of the same character set (or code points) known as the 'Universal Character Set' (UCS). ASCII shares many of its code points with UCS code points but not all of them and definitely not the so-called extended ASCII code points or their associated code pages.

Looking at the different encodings for UCS code points, UTF-8 has some good features. One of these include not having to worry about the byte order or endianness. That is a big plus for dealing with different OS's. Another is that it is a encoding that is easy to detect by examination.

I think PureBasic's unicode format (UCS-2) might of been selected based on API use. Being an older encoding for UCS it cannot encode all of UCS code points. This is due to changes having been made to UCS as it developed over time. PureBasic's unicode format also allowed using an offset for string functions based on a assumed character size of 2 bytes. This assumption in the String library functions is flawed and hopefully will be corrected at some time in the future. The flaw is that UCS code points can be 'stacked' together to produce a resulting representation or depiction of a character. This includes a basic character shape plus other attributes such as accents.

Just as some coders are being greatly affected by the loss of ASCII as an option for compiling I think that any changes in the encoding formats used for unicode (UCS) will affect many coders. It should be a well thought out process.
Fred
Administrator
Administrator
Posts: 18161
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: No Ascii?

Post by Fred »

Psych wrote:Agreed.

However wouldn't UTF8 be better as the standard? I mean, I haven't seen any real world applications that use unicode, although maybe I haven't been looking in the right places.
What do you mean by real world application ? Most store their files in utf-8, as PureBasic does by default when using the File lib, Preference lib or XML lib. UCS2 is only used internally by PureBasic for string processing.
Post Reply