Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Does XE7 have support for older style strings?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 606 - Last Post: Oct 25, 2014 12:43 PM Last Post By: Rudy Velthuis (...
Peter Gannon

Posts: 23
Registered: 6/16/06
Does XE7 have support for older style strings?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2014 9:25 PM
I would love to upgrade to XE 7 as I am currently using Delphi 2006.

I have a big existing application (win32 desktop multimedia application). There are many files stored that use older pascal style strings (1 byte per character, with a length byte) that are expected to be a certain size. For example, a string might be a string[64] and occupy 65 bytes in the file format.

So I'm wondering how could I update to the new version, and support these older style strings, since I've heard that the new strings are all UTF16 and 2 bytes per character.
John Frazier


Posts: 726
Registered: 2/17/00
Re: Does XE7 have support for older style strings?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2014 9:57 PM   in response to: Peter Gannon in response to: Peter Gannon
Peter Gannon wrote:
I would love to upgrade to XE 7 as I am currently using Delphi 2006.

I have a big existing application (win32 desktop multimedia application). There are many files stored that use older pascal style strings (1 byte per character, with a length byte) that are expected to be a certain size. For example, a string might be a string[64] and occupy 65 bytes in the file format.

So I'm wondering how could I update to the new version, and support these older style strings, since I've heard that the new strings are all UTF16 and 2 bytes per character.

We made the Unicode switch ~2009 and documented conversion stuff quite a bit. There is a landing page here that I have sent a lot of folks to http://www.embarcadero.com/rad-in-action/migration-upgrade-center

FYI, some people like to do incremental upgrades from older versions for various reasons. Ever since we released XE we have been including "previous version access" for free as a feature of the license. So if you bought Delphi XE7 Enterprise for example you could get downloads and licenses for Enterprise versions of XE7, XE6, XE5, XE4, XE3, XE2, XE, 2010, 2009, 2007, and 7. Then you reserve the option to move up at your own pace.
--
John Frazier (Embarcadero Newsgroup Admin)
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2014 10:27 PM   in response to: Peter Gannon in response to: Peter Gannon
Peter Gannon wrote:
I would love to upgrade to XE 7 as I am currently using Delphi 2006.

I have a big existing application (win32 desktop multimedia application). There are many files stored that use older pascal style strings (1 byte per character, with a length byte) that are expected to be a certain size. For example, a string might be a string[64] and occupy 65 bytes in the file format.

So I'm wondering how could I update to the new version, and support these older style strings, since I've heard that the new strings are all UTF16 and 2 bytes per character.

Non mobile compilers still have short string (the one you are describing) and
AnsiString. It is the mobile compilers than have just UnicodeString.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2014 4:57 AM   in response to: Peter Gannon in response to: Peter Gannon
Peter Gannon wrote:

I would love to upgrade to XE 7 as I am currently using Delphi 2006.

I have a big existing application (win32 desktop multimedia
application). There are many files stored that use older pascal style
strings (1 byte per character, with a length byte) that are expected
to be a certain size. For example, a string might be a string[64] and
occupy 65 bytes in the file format.

So I'm wondering how could I update to the new version, and support
these older style strings, since I've heard that the new strings are
all UTF16 and 2 bytes per character.

ShortStrings and sized strings (a special case of ShortString) are
still available in the desktop versions (Win32, Win64, OSX32), so that
should not be a problem.

But you might want to take this as an opportunity to get rid of these
Turbo Pascal style strings and (slowly) update your code to use
UnicodeStrings. That should help when porting, one day, to other
platforms, which might not have these types anymore.

--
Rudy Velthuis http://www.rvelthuis.de

"Learning is not compulsory. Neither is survival."
-- W. Edwards Deming
Thomas Schulz

Posts: 62
Registered: 12/6/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 2:45 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
But you might want to take this as an opportunity to get rid of these
Turbo Pascal style strings and (slowly) update your code to use
UnicodeStrings. That should help when porting, one day, to other
platforms, which might not have these types anymore.

Even if my app is fully unicodestring in its user interface, I sill have maybe 30-40k lines of code spread across
10 times that has to deal with input in various other string types where converting to unicodestring first will be costly.

- I can not control input which comes in all sorts
- I am not going to store strings in memory in anything than utf8
- I prefer to avoid conversions back and forth constantly although it of course sometimes is necessary
- I rather not make such a huge change again with testing, bug fixing etc. (I already did the ansi > unicodestring for all general string stuff and 32 to 64bit, but this makes no sense to me IMHO)

Anyhow, I guess it is stupid to argue this, but it essentially prevents my business case moving my code "platform" to mobile platforms using Delphi - I have to consider other possible solutions.
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 1:21 PM   in response to: Thomas Schulz in response to: Thomas Schulz
Thomas Schulz wrote:
But you might want to take this as an opportunity to get rid of these
Turbo Pascal style strings and (slowly) update your code to use
UnicodeStrings. That should help when porting, one day, to other
platforms, which might not have these types anymore.

Even if my app is fully unicodestring in its user interface, I sill have maybe 30-40k lines of code spread across
10 times that has to deal with input in various other string types where converting to unicodestring first will be costly.

- I can not control input which comes in all sorts
- I am not going to store strings in memory in anything than utf8
- I prefer to avoid conversions back and forth constantly although it of course sometimes is necessary
- I rather not make such a huge change again with testing, bug fixing etc. (I already did the ansi > unicodestring for all general string stuff and 32 to 64bit, but this makes no sense to me IMHO)

Anyhow, I guess it is stupid to argue this, but it essentially prevents my business case moving my code "platform" to mobile platforms using Delphi - I have to consider other possible solutions.

I am in similar situation. Not having 8-bit string types on mobile platforms is
complete showstopper for me.

--
Dalija Prasnikar
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 25, 2014 8:23 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar <> wrote in news:692429 at forums dot embarcadero dot com:

I am in similar situation. Not having 8-bit string types on mobile
platforms is complete showstopper for me.

Same here... we have abandoned mobile development now, focusing back on VM
Servers and RDP clients on the mobile device.

The string changes (removal of 8 bit and change to 0 base) totally killed
our hope.
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2014 4:59 AM   in response to: Christopher Burke in response to: Christopher Burke
"Christopher Burke" wrote on Thu, 25 Sep 2014 08:23:31 -0700:

The string changes (removal of 8 bit and change to 0 base) totally killed
our hope.

In my case it means that code I have been using for over 15 years has
to be re-written, which means that there is very little in the way of
code re-use available to me with Delphi mobile.

I welcomed the Unicodification of Delphi 2009 and moved everything
that would benefit to the new default string type. But there are
cases where doing so is just the wrong thing to do, despite those who
continue to imply that anyone who has use for 8-bit string types is
"doing it wrong."

Oh well.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2014 6:00 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs <nospam@nowhere.invalid> wrote in
news:693498 at forums dot embarcadero dot com:

"Christopher Burke" wrote on Thu, 25 Sep 2014 08:23:31 -0700:

The string changes (removal of 8 bit and change to 0 base) totally
killed our hope.

In my case it means that code I have been using for over 15 years has
to be re-written, which means that there is very little in the way of
code re-use available to me with Delphi mobile.

Count yourself lucky, some of the stuff I have to do (interfacing with 3rd
party 25 year old systems) can't be rewritten without resorting to
unsupported hacks.

I welcomed the Unicodification of Delphi 2009 and moved everything
that would benefit to the new default string type. But there are
cases where doing so is just the wrong thing to do, despite those who
continue to imply that anyone who has use for 8-bit string types is
"doing it wrong."

Well, I agree using 8-bit string types is wrong, however that doesn't mean
that people I deal with have stopped using them.


Oh well.

Ditto ... meanwhile Microsoft is getting the money for stacks of VM'ed OS
licences :(
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 4:54 PM   in response to: Thomas Schulz in response to: Thomas Schulz
Thomas wrote:

Anyhow, I guess it is stupid to argue this, but it essentially
prevents my business case moving my code "platform" to
mobile platforms using Delphi - I have to consider other possible
solutions.

See this patch that re-enables 8bit strings in the mobile compilers:

The Return of the Byte-Strings
http://andy.jgknet.de/blog/2013/10/the-return-of-the-byte-strings/

--
Remy Lebeau (TeamB)
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 7:09 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy,

| See this patch that re-enables 8bit strings in the mobile compilers:
|
| The Return of the Byte-Strings
| http://andy.jgknet.de/blog/2013/10/the-return-of-the-byte-strings/

Wow! That was a year ago! Wonder why EMBT hasn't "fixed" it yet?

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 8:14 PM   in response to: Quentin Correll in response to: Quentin Correll
Quentin wrote:

Wow! That was a year ago! Wonder why EMBT hasn't "fixed" it yet?

Because they don't want to support 8bit strings in mobile. It was easier
for them to just hide/disable the functionality instead of ripping them out
completely (which I suspect they will do eventually). That is the only reason
why the patch works at all. The functionality still exists in the compiler
and RTL, it is just hidden from user code by default. The patch exposed
access to it again.

--
Remy Lebeau (TeamB)
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 10:19 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Quentin wrote:

Wow! That was a year ago! Wonder why EMBT hasn't "fixed" it yet?

Because they don't want to support 8bit strings in mobile.

That was my assessment as well, and it still leaves me confused on their strategy.

One huge advantage (the?) is the ability to use existing code in mobile or cross apps. That kind of says you'd do what it takes to help move existing libraries.

If you're going to start from scratch on mobile apps I'm not sure Delphi is the top option.

Dan
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 11:21 PM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:

Remy Lebeau (TeamB) wrote:
Quentin wrote:

Wow! That was a year ago! Wonder why EMBT hasn't "fixed" it yet?

Because they don't want to support 8bit strings in mobile.

That was my assessment as well, and it still leaves me confused on
their strategy.

It is quite simple: get rid of the confusing number of string types and
concentrate on one.
--
Rudy Velthuis http://www.rvelthuis.de

"Before you speak, ask yourself is it kind, is it necessary, is
it true, does it improve on the silence?"
-- Shirdi Sai Bab
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2014 12:08 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Dan Barclay wrote:

Remy Lebeau (TeamB) wrote:
Quentin wrote:

Wow! That was a year ago! Wonder why EMBT hasn't "fixed" it yet?

Because they don't want to support 8bit strings in mobile.

That was my assessment as well, and it still leaves me confused on
their strategy.

It is quite simple: get rid of the confusing number of string types and
concentrate on one.

Here we go again <G>

--
Dalija Prasnikar
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2014 4:35 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Sun, 21 Sep 2014 23:21:17 -0700:

It is quite simple: get rid of the confusing number of string types and
concentrate on one.

Confusing for whom? What a ridiculous argument.

But it has all been said before. Sigh.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2014 4:47 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Sun, 21 Sep 2014 23:21:17 -0700:

It is quite simple: get rid of the confusing number of string types
and concentrate on one.

Confusing for whom? What a ridiculous argument.

But it has all been said before. Sigh.

How about the unnecessary number of strings.

Imagine if a fraction of the effort spent here on endless, circular and
absolutist discussions had been used to make legitimate business cases
to Embarcadero with actual minimum requirements.

--
Regards,
Bruce McGee
Glooscap Software
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2014 8:45 AM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee wrote:

Imagine if a fraction of the effort spent here on endless, circular
and absolutist discussions had been used to make legitimate business
cases to Embarcadero with actual minimum requirements.

Ranting on non-tech is much more attractive than actually sitting down
and thinking and writing down a proper business case. <g>

--
Rudy Velthuis http://www.rvelthuis.de

"Hearing nuns' confessions is like being stoned to death with
popcorn." -- Fulton Sheen.
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 27, 2014 5:48 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Ranting on non-tech is much more attractive than actually sitting down
and thinking and writing down a proper business case. <g>

In the case of our own company, Embarcadero has missed thousands of dollars of revenue because of the versions we had to skip due to unicode hardships. And I bet we're not alone.

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 27, 2014 5:55 AM   in response to: Arthur Hoornweg in response to: Arthur Hoornweg
Arthur Hoornweg wrote:

Rudy Velthuis (TeamB) wrote:

Ranting on non-tech is much more attractive than actually sitting
down and thinking and writing down a proper business case. <g>

In the case of our own company, Embarcadero has missed thousands of
dollars of revenue because of the versions we had to skip due to
unicode hardships. And I bet we're not alone.


They did everything possible to make the Unicode conversion as easy as
possible. But you can't make an omelette without breaking eggs.

I have no idea what kind of hardships you encountered, so can't say why
the conversion was so hard for your company.

--
Rudy Velthuis http://www.rvelthuis.de

"This monkey mythology of Darwin is the cause of
permissiveness, promiscuity, prophylactics, perversions,
pregnancies, abortions, porno-therapy, pollution, poisoning and
proliferation of crimes of all types."
-- Judge Braswell Dean
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 28, 2014 11:29 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

They did everything possible to make the Unicode conversion as easy as
possible. But you can't make an omelette without breaking eggs.

You know very well that unicodifying string routines that handle binary data makes no sense at all, it involves a re-write.

The main (only?) reason for using strings for non-textual data is that it's so damned convenient to have utility functions like insert/delete/copy/pos/concatenation. If Borland etc had incorporated similar routines for dynamic arrays ten years ago then we really wouldn't have this conversation right now.

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 2:08 AM   in response to: Arthur Hoornweg in response to: Arthur Hoornweg
Arthur Hoornweg wrote:

Rudy Velthuis (TeamB) wrote:

They did everything possible to make the Unicode conversion as easy
as possible. But you can't make an omelette without breaking eggs.

You know very well that unicodifying string routines that handle
binary data makes no sense at all

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

IMO, if you have been doing that for a long time already, you have been
doing it wrong for a long time already.

--
Rudy Velthuis http://www.rvelthuis.de

"We have a political system that awards office to the most
ruthless, cunning, and selfish of mortals, then act surprised
when those willing to do anything to win power are equally
willing to do anything with it."
-- Michael Rivero
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 2:53 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

I don't think anybody would disagree with you on that specific
principle. But the problem is that the binary data alternatives don't
have all those super-useful functions for concatenating, pos-ing,
trimming, and so on. If they did, I feel sure people would be happy to
use them rather than 8-bit strings.

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 3:20 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Rudy Velthuis (TeamB) wrote:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

I don't think anybody would disagree with you on that specific
principle. But the problem is that the binary data alternatives don't
have all those super-useful functions for concatenating, pos-ing,
trimming, and so on. If they did, I feel sure people would be happy to
use them rather than 8-bit strings.

There are some nice additions to dynamic arrays in latest Delphi. So
you can do most of that stuff now.

Still 8-bit strings are also used for storing UTF-8 encoded text, so they have
purpose beyond "abused" binary storage in todays Unicode world.

--
Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 4:42 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Still 8-bit strings are also used for storing UTF-8 encoded text, so
they have purpose beyond "abused" binary storage in todays Unicode
world.

But UTF-8 can losslessly be converted to UTF-16, and back. Delphi has
all it needs to do that.

--
Rudy Velthuis http://www.rvelthuis.de

"We all agree that your theory is crazy, but is it crazy enough?"
-- Niels Bohr (1885-1962)
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 4:45 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Dalija Prasnikar wrote:

Still 8-bit strings are also used for storing UTF-8 encoded text, so
they have purpose beyond "abused" binary storage in todays Unicode
world.

But UTF-8 can losslessly be converted to UTF-16, and back. Delphi has
all it needs to do that.

For zillionth time, sometimes you don't want to convert as UTF8 encoded
strings occupy less memory.

--
Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 5:19 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Rudy Velthuis (TeamB) wrote:
Dalija Prasnikar wrote:

Still 8-bit strings are also used for storing UTF-8 encoded text,
so they have purpose beyond "abused" binary storage in todays
Unicode world.

But UTF-8 can losslessly be converted to UTF-16, and back. Delphi
has all it needs to do that.

For zillionth time, sometimes you don't want to convert as UTF8
encoded strings occupy less memory.

And I have said a zillion plus one times, that if memory is a limiting
factor, I would think about a redesign. 64 bits might also be a
solution, although IMO, a redesign would be much better.

--
Rudy Velthuis http://www.rvelthuis.de

"The most heinous and the cruelest crimes of which history has
record have been committed under the cover of religion or
equally noble motives."
-- Mohandas Gandhi
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 10:23 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija,

| For zillionth time, sometimes you don't want to convert as UTF8
| encoded strings occupy less memory.

I was going to "yell" at Rudy again too,... until I saw that you had
replied and took a look. <giggle>

I have some uses of 8-bit byte character "strings" where it is not
"less memory" but where the actual ram byte-count size is essential to
my functionality.

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 12:17 PM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll wrote:
Dalija,

| For zillionth time, sometimes you don't want to convert as UTF8
| encoded strings occupy less memory.

I was going to "yell" at Rudy again too,... until I saw that you had
replied and took a look. <giggle>

It just occurred to me that we are discussing "the string theory"
with "our" Sheldon ;-)

--
Dalija Prasnikar
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 1:37 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija,

| It just occurred to me that we are discussing "the string theory"
| with "our" Sheldon ;-)

LOL!

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 5:31 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Quentin Correll wrote:
Dalija,

For zillionth time, sometimes you don't want to convert as UTF8
encoded strings occupy less memory.

I was going to "yell" at Rudy again too,... until I saw that you had
replied and took a look. <giggle>

It just occurred to me that we are discussing "the string theory"
with "our" Sheldon ;-)

I can assure you that I don't look like a praying mantiss, though. <g>

--
Rudy Velthuis http://www.rvelthuis.de

"Once a new technology starts rolling, if you're not part of the
steamroller, you're part of the road." -- Stewart Brand
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 5:39 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Mon, 29 Sep 2014 04:42:54 -0700:

But UTF-8 can losslessly be converted to UTF-16, and back.

The round trip does not always produce the same result you started
with-- it depends on what is done during the conversion. Usually that
should be a black box and shouldn't matter, but there are times when
it does matter.

There are also cases where working with Delphi's RegEx library
produces unusable results (offsets) because of the internal converting
between UTF-8 and UTF-16. Not to mention totally unacceptable
performance when doing significant repetitive work on very long
strings.

But this was all pointed out before and shrugged off.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 9:44 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Mon, 29 Sep 2014 04:42:54 -0700:

But UTF-8 can losslessly be converted to UTF-16, and back.

The round trip does not always produce the same result you started
with-- it depends on what is done during the conversion.

Sure, but it would still be the same text (i.e. it would be canonically
equivalent), even if the individual bytes may be different (due to
differences in composition). There are ways to normalize that.

--
"Usenet is like a herd of performing elephants with diarrhea
-- massive, difficult to redirect, awe-inspiring, entertaining,
and a source of mind-boggling amounts of excrement when you
least expect it." -- Gene Spafford
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 6:29 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Mon, 29 Sep 2014 09:44:31 -0700:

Brandon Staggs wrote:

"Rudy Velthuis" wrote on Mon, 29 Sep 2014 04:42:54 -0700:

But UTF-8 can losslessly be converted to UTF-16, and back.

The round trip does not always produce the same result you started
with-- it depends on what is done during the conversion.

Sure, but it would still be the same text (i.e. it would be canonically
equivalent), even if the individual bytes may be different (due to
differences in composition). There are ways to normalize that.

This is not theoretical for me. I have run into and solved issues
that come up because of the differences introduced "behind the scenes"
when making the naive assumption that "text is text" while working
with text that comes in different containers along with Delphi and
Windows string functions. A really huge problem as yet unsolved in
Delphi is that the default string type does not match the string type
used internally by the RegEx object. This leads to unsuable results--
while you should expect the RegEx functionality to return offsets and
lengths and boolean match results that you can "just use" with "just
text", the reality is that there are more than a few edge cases where
that just doesn't work, and you have to know what is going on to be
able to make it work. One of the primary uses I have for UTF8Strings
is being able to do efficient and accurate RegEx calls.

Your attitude that 8-bit strings are not something we should ever be
using for text is one made out of a lack of experience. I completely
agree that almost always, the default string type should be used and
the method of storing the text can be ignored by the programmer. But
I don't live in a world where "almost always" works for me.

What's so ridiculous about saying "using 8-bit strings is doing it
wrong" is that Delphi uses 8-bit strings internally for things itself
like RegEx. Until THEY are "not doing it wrong" there are very
important reasons why I need direct access to UTF8Strings and there is
no reason they should not be exposed in a unit for me to be able to
use. If they are concerned about all those millions of newbies trying
to learn Delphi (yeah, right) being scared off by having more than one
string type available, they can shove it all in a separate namespace
or something and not tell the newbies it's there.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 9:53 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon wrote:

A really huge problem as yet unsolved in Delphi is that the default string
type does not match the string type used internally by the RegEx object.
This leads to unsuable results-- while you should expect the RegEx
functionality to return offsets and lengths and boolean match results that
you can "just use" with "just text", the reality is that there are more
than
a few edge cases where that just doesn't work, and you have to know
what is going on to be able to make it work. One of the primary uses I
have for UTF8Strings is being able to do efficient and accurate RegEx calls.

Are you basing your entire codebase around the encoding of one object, rather
than the native encoding of the entire RTL/VCL/FMX and OS. Seems to me that
RegEx should be changed to match Delphi's native string type, not the other
way around.

--
Remy Lebeau (TeamB)
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 2:45 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
"Remy Lebeau" wrote on Tue, 30 Sep 2014 09:53:28 -0700:

Are you basing your entire codebase around the encoding of one object, rather
than the native encoding of the entire RTL/VCL/FMX and OS. Seems to me that

No, but I was using TPerlRegex before it was integrated into Delphi
(poorly -- see the multiple posts about abysmal performance of the
Delphi regex code). I did consider switching to a native UTF-16 RegEx
library but all this code is already written and it works, and I am
weary of adding more dependencies on third-party libraries anyway.

I have need to do multiple consecutive complex Regular Expression
operations on very long strings. Not only can I not count on Delphi
to give me usable offsets because of the internal conversion, knowing
that the internals are all UTF-8 allows me to eliminate a huge
performance hit by avoiding unnecessary re-encoding of these long
strings between each RegEx call.

One project I recently worked on used very simple RegEx calls on very
long strings with Delphi's supplied regex library. It was abysmally
slow -- taking fifteen minutes to parse input was not acceptable. I
spent 10 minutes re-writing all of the related code to use TPerlRegex
instead and explicitly to convert to UTF8String at the start and back
to String at the end, and cut that time down to mere seconds. I
realize most people never hit cases like these but nevertheless they
exist.

RegEx should be changed to match Delphi's native string type, not the other
way around.

Agree 100%. But even with the "deprecation" (of sorts) of UTF8String
and the lack of exposed support for it in mobile, they are still
using an 8-bit PCRE RegEx library internally (last I checked). This
being the case, the refrain that there is no need to use 8-bit strings
rings quite hollow. Maybe if they stop using UTF8Strings themselves,
somebody could make that argument a bit more convincingly.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 11:56 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Remy Lebeau" wrote on Tue, 30 Sep 2014 09:53:28 -0700:

Are you basing your entire codebase around the encoding of one
object, rather than the native encoding of the entire RTL/VCL/FMX
and OS. Seems to me that

No, but I was using TPerlRegex before it was integrated into Delphi

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now. Wasn't that
integrated?

--
Rudy Velthuis http://www.rvelthuis.de

"Civil disobedience, thatís not our problem. Our problem is
that people are obedient all over the world in the face of
poverty and starvation and stupidity, and war, and cruelty. Our
problem is that people are obedient while the jails are full of
petty thieves, and all the while the grand thieves are running
the country. That's our problem."
-- Howard Zinn

Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 6:04 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Tue, 30 Sep 2014 23:56:24 -0700:

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now.

A long time actually.

Wasn't that
integrated?

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 6:16 AM   in response to: Brandon Staggs in response to: Brandon Staggs
"Brandon Staggs" wrote on Wed, 1 Oct 2014 06:04:26 -0700:

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

So I looked (XE7). Still all kinds of UTF8 conversions going on in
the regex code. This stuff is a major performance killer in
non-trivial use, and it's mystifying that Delphi is not using a 16-bit
regex library at this point.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2014 12:12 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 30 Sep 2014 23:56:24 -0700:

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now.

A long time actually.

Wasn't that
integrated?

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

OK. The last time I used PCRE was on the Mac, in Objective-C. There, I
successfully downloaded and integrated the new UTF-16-aware PCRE into
the regex library I used. I guess it could be done here too.

--
Rudy Velthuis http://www.rvelthuis.de

"They said I was the greatest pitcher they ever saw; I couldnít
understand why they couldnít give me no justice."
-- Satchel Paige
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2014 10:56 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 02.10.2014 09:12, schrieb Rudy Velthuis (TeamB):
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 30 Sep 2014 23:56:24 -0700:

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now.

A long time actually.

Wasn't that
integrated?

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

OK. The last time I used PCRE was on the Mac, in Objective-C. There, I
successfully downloaded and integrated the new UTF-16-aware PCRE into
the regex library I used. I guess it could be done here too.

Yes, but: why isn't Delphi doing it then out of the box already?
If they deliver included stuff that should be reasonably up to date!

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2014 1:50 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 02.10.2014 09:12, schrieb Rudy Velthuis (TeamB):
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 30 Sep 2014 23:56:24 -0700:

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now.

A long time actually.

Wasn't that
integrated?

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

OK. The last time I used PCRE was on the Mac, in Objective-C.
There, I successfully downloaded and integrated the new
UTF-16-aware PCRE into the regex library I used. I guess it could
be done here too.

Yes, but: why isn't Delphi doing it then out of the box already?

Probably because they didn't get to it yet. Note that on the Mac, the
existing libraries did not use the UTF-16 PCRE either, probably for the
same reason.

--
Rudy Velthuis http://www.rvelthuis.de

"My experience in Amsterdam is that cyclists ride where the hell
they like and aim in a state of rage at all pedestrians while
ringing their bell loudly, the concept of avoiding people being
foreign to them.

My dream holiday would be a) a ticket to Amsterdam b) immunity
from prosecution and c) a baseball bat."
-- Terry Pratchett
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:32 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 02.10.2014 09:12, schrieb Rudy Velthuis (TeamB):
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 30 Sep 2014 23:56:24 -0700:

FWIW, AFAIK, PCRE has a true Unicode (UTF-16) version now.

A long time actually.

Wasn't that
integrated?

No. At least not as of XE5 -- I haven't got into the Xe7 one yet.

OK. The last time I used PCRE was on the Mac, in Objective-C.
There, I successfully downloaded and integrated the new
UTF-16-aware PCRE into the regex library I used. I guess it could
be done here too.

Yes, but: why isn't Delphi doing it then out of the box already?

Why wasn't Objective-C (and still isn't, AFAIK) doing it "out of the
box"? I guess there is a reason.

--
Rudy Velthuis http://www.rvelthuis.de

"Give me a museum and I'll fill it."
-- Pablo Picasso (1881-1973)

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 4:41 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

I don't think anybody would disagree with you on that specific
principle. But the problem is that the binary data alternatives don't
have all those super-useful functions for concatenating, pos-ing,
trimming, and so on.

XE7 has most of those for TBytes as well.

--
Rudy Velthuis http://www.rvelthuis.de

"It is curious that physical courage should be so common in the
world and moral courage so rare."
-- Mark Twain
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 7:48 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:693908
@forums.embarcadero.com:

Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

I don't think anybody would disagree with you on that specific
principle. But the problem is that the binary data alternatives don't
have all those super-useful functions for concatenating, pos-ing,
trimming, and so on.

XE7 has most of those for TBytes as well.

Does it have:

* upper/lower case
* pos("text")
* text splitting (e.g. splitting on commas) to strings
* conversion to/from unicode strings with correct ASCII encoding ?

Here in lies the issue, I get my ansi strings straight into proper strings
AS SOON as I can, if I was to use TBytes, I'd end up having to write an
entire library (probably called ansistrings) to do it all, that unit might
well use TBytes to do all the work, however it hasn't removed the absolute
requirement I have for ansi strings at all.

What it comes down to, several of my external interfaces REQUIRE me to have
ansistrings, there are TWO ways to do this.

1. Use Delphi Ansi Strings
2. Write new ansi string library, and the modify appropriate other
libraries source code to use my ansi string library.

Either way - Ansi strings ARE required.
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 10:21 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher,

| Either way - Ansi strings ARE required.

+1000!!!

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 10:32 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher,

| Either way - Ansi strings ARE required.

+1000!!!

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Jim Fleming

Posts: 113
Registered: 2/12/00
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 1:54 PM   in response to: Christopher Burke in response to: Christopher Burke
Hear, hear !!!!!
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 1:48 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

XE7 has most of those for TBytes as well.

Does it have:

* upper/lower case
* pos("text")
* text splitting (e.g. splitting on commas) to strings
* conversion to/from unicode strings with correct ASCII encoding ?

That is text manipulation. For that, you have strings. And yes, all XE
version (and probably a few before that) have TEncoding, performing all
the necessary conversions between byte arrays and Unicode. And well,
ASCII is part of Unicode, and conversion from ASCII is extremely simple.

And well, what is exactly upper/lower case? That very much depends on
the encoding.

FWIW, my TAnsiString type does have all that, x-platform, and it uses
TBytes for storage. The hardest part was to write a usably fast
conversion from and to Unicode for any conceivable codepage on
non-Windows platforms. The main bottleneck turned out to be the
translation of a codepage to an encoding name (which is what the POSIX
libraries require). On Windows, conversion to and from Unicode was a
piece of cake.

--
Rudy Velthuis http://www.rvelthuis.de

"The world is too dangerous to live in, not because of the
people who do evil, but because of the people who sit and let
it happen."
-- Albert Einstein
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:35 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696569
@forums.embarcadero.com:

Christopher Burke wrote:

XE7 has most of those for TBytes as well.

Does it have:

* upper/lower case
* pos("text")
* text splitting (e.g. splitting on commas) to strings
* conversion to/from unicode strings with correct ASCII encoding ?

That is text manipulation. For that, you have strings.

Exactly - so to get them into strings I need the above functions.

And well, what is exactly upper/lower case? That very much depends on
the encoding.

Not in ASCII strings it doesn't...

FWIW, my TAnsiString type does have all that, x-platform, and it uses
TBytes for storage. The hardest part was to write a usably fast
conversion from and to Unicode for any conceivable codepage on
non-Windows platforms.

Basically - you are saying that we need ansi strings, just giving a third
option for how to get them.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:58 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

That is text manipulation. For that, you have strings.

Exactly - so to get them into strings I need the above functions.

That is the wrong way around. You should first get them into strings
(and, since you said it is ASCII, that is very easy), and then perform
the above functions.

And well, what is exactly upper/lower case? That very much depends
on the encoding.

Not in ASCII strings it doesn't...

If you only have 7-bit ASCII, I already showed that conversion is
extremely simple, as you can map it directly, without conversion, to
Unicode. If it is more than 7-bit, it is not ASCII anymore, and you
have to deal with codepages and encodings, and you have to know that
the uppercase of ä is Ä, etc.


FWIW, my TAnsiString type does have all that, x-platform, and it
uses TBytes for storage. The hardest part was to write a usably fast
conversion from and to Unicode for any conceivable codepage on
non-Windows platforms.

Basically - you are saying that we need ansi strings, just giving a
third option for how to get them.

I did not publish it yet. I more or less wrote it to show that it is
not rocket science to use TBytes and bytes instead of AnsiStrings and
AnsiChars, and as an intermediate suolution for those who can't convert
directly. I personally would use TBytes directly.

--
Rudy Velthuis http://www.rvelthuis.de

"And God said, 'Let there be light' and there was light, but the
Electricity Board said He would have to wait until Thursday to be
connected." -- Spike Milligan.
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 6:14 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Sun, 12 Oct 2014 02:58:51 -0700:

I did not publish it yet. I more or less wrote it to show that it is
not rocket science to use TBytes and bytes instead of AnsiStrings and
AnsiChars, and as an intermediate suolution for those who can't convert
directly. I personally would use TBytes directly.

It won't work for every situation, but regardless, why should this be
necessary? Why not continue to support the AnsiStrings unit which
works and has been tested, which is being used by applications for
years? How foolish it is to insist that Delphi developers re-write
non-UI code that has been tested and debugged in some cases for over a
decade just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally but refuses to
continue providing the unit for coders to use if they need it.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 6:30 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Sun, 12 Oct 2014 02:58:51 -0700:

I did not publish it yet. I more or less wrote it to show that it is
not rocket science to use TBytes and bytes instead of AnsiStrings
and AnsiChars, and as an intermediate suolution for those who can't
convert directly. I personally would use TBytes directly.

It won't work for every situation, but regardless, why should this be
necessary? Why not continue to support the AnsiStrings unit

They continue to support the AnsiStrings unit. But AnsiStrings are not
available in the mobile compilers.

Why not? I think they already said why. And I do think that is a made
decision. You can try to persuade them to change it, but I'm not so
sure they actually will.

Is it foolish to insist people change their code? I don't think so.
People should get away from the mindset that strings are of a certain
format. Strings are text containers, and they provide a certain range
of operations on these. Of course conversion between a certain format
and strings should be provided.

How that works internally should not matter. That allows them to change
the internal representation of strings to whatever is more suitable on
a platform. On Linux, it may internally be UTF-8, while on platforms
like Windows, iOS and Android, where strings are UTF-16 anyway, it
makes more sense to use UTF-16 internally. This should be transparent
to the user of strings. And, if on a platform, it makes more sense to
store strings as something else, that should be possible too, without
breaking code.
--
Rudy Velthuis http://www.rvelthuis.de

"The difference between 'involvement' and 'commitment' is like an
eggs-and-ham breakfast: the chicken was 'involved' - the pig was
'committed'." -- unknown
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 7:09 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696609
@forums.embarcadero.com:


They continue to support the AnsiStrings unit. But AnsiStrings are not
available in the mobile compilers.

Exactly - that is the reason we are dead in the tracks on mobile
developent, that SINGLE reason kills it.

Now your brain might not be up to understand this plain situation - but
like the climate change deniers, and the young earthers and the
creationists - your opinion does not alter the reality.

That reality is what I have to live with.

That reality no longer involves mobile thanks 120% to this decision from
Embarcadero to remove a critical tool from the Delphi for mobile.

Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 9:37 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Now your brain might not be up to understand this plain situation

If that doesn't convince people, I don't know what will.

/s

That reality is what I have to live with.

That reality no longer involves mobile thanks 120% to this decision
from Embarcadero to remove a critical tool from the Delphi for mobile.

If you are using strings in a way that you were warned against a decade
ago, I'm not sure you can pin that on Embarcadero.

And you aren't helping by insisting that what you want to do is
impossible, especially if you're saying it to people who have actually
done it.

So instead of relying on hyperbole and exaggeration, a much more
effective argument is having a concrete (and not hypothetical)
requirement to port existing code to mobile, but it will require enough
changes that the payoff might be worth the effort. If enough people are
legitimately in this same situation, Embarcadero might reconsider, or
at least alter their plans.

It's not as flashy as claiming that Delphi causes Ebola, but it has the
benefit of being the truth.

--
Regards,
Bruce McGee
Glooscap Software
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 6:45 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Sun, 12 Oct 2014 06:30:22 -0700:

Brandon Staggs wrote:

"Rudy Velthuis" wrote on Sun, 12 Oct 2014 02:58:51 -0700:

I did not publish it yet. I more or less wrote it to show that it is
not rocket science to use TBytes and bytes instead of AnsiStrings
and AnsiChars, and as an intermediate suolution for those who can't
convert directly. I personally would use TBytes directly.

It won't work for every situation, but regardless, why should this be
necessary? Why not continue to support the AnsiStrings unit

They continue to support the AnsiStrings unit. But AnsiStrings are not
available in the mobile compilers.

Are you trying to win a high school debate? Why this silly, useless
response? Of course I am talking about mobile. Your continued
harping on "mobile never had ansi strings" is as relevant to the
discussion as a grammar correction.

Is it foolish to insist people change their code? I don't think so.
People should get away from the mindset that strings are of a certain
format. Strings are text containers, and they provide a certain range
of operations on these. Of course conversion between a certain format
and strings should be provided.

All of this is no different than integers. Sometimes I need an Int64.
Usually an Integer will do. Often I need a NativeInt, and sometimes I
need to control whether or not it is signed. And on the rare occasion
I must be aware of how the most significant bits are encoded.

How that works internally should not matter.

To wit -- sometimes it does, no matter what the purists say.

Embarcadero did not design a new language like C# when they started
marketing Delphi Mobile. They want Delphi developers to use their
system and dropping 8-bit string types has cause many developers to
set aside any interest in using Delphi for mobile projects. It's been
explained over and over.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:55 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

Why not continue to support the AnsiStrings unit

They continue to support the AnsiStrings unit. But AnsiStrings are
not available in the mobile compilers.

Are you trying to win a high school debate? Why this silly, useless
response?

Useless? It is quite truthful. But you don't like it because you think
that you need AnsiStrings on mobile. AFAICT, you don't.

--
Rudy Velthuis http://www.rvelthuis.de

"That is the saving grace of humor, if you fail no one is laughing
at you." -- A. Whitney Brown
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 12:16 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Tue, 14 Oct 2014 11:55:49 -0700:

Brandon Staggs wrote:

Why not continue to support the AnsiStrings unit

They continue to support the AnsiStrings unit. But AnsiStrings are
not available in the mobile compilers.

Are you trying to win a high school debate? Why this silly, useless
response?

Useless? It is quite truthful.

It is as useful as a grammar correction. You full well know what
people mean when they say "Ansistrings were removed." These are
Delphi developers who have been using Delphi RTL for years and they
have a reasonable expectation that a Delphi development environment
marketed to them as a cross-platform tool would continue to contain
RTL that is not specific to a platform. Moreover, I am quite sure
that the mobile RTL was not designed from scratch. It is quite likely
that they literally removed items they did not want to keep from an
existing code base.

But you don't like it because you think
that you need AnsiStrings on mobile. AFAICT, you don't.

I don't think that. I think having UTF8String would make my job a lot
easier since Delphi still does not use a RegEx library that matches
its own default string type, and because I do not want to refactor and
debug code that already works perfectly with no system dependencies,
and I presume that for many other developers the loss of explicit
8-bit string types is an inconvenience that removes much of the
benefits of using Delphi for their mobile applications.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 12:26 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

Useless? It is quite truthful.

It is as useful as a grammar correction. You full well know what
people mean when they say "Ansistrings were removed."

I know what they mean, but I also know that they are wrong. One can not
remove what was never there. I don't know if that is useful, but it is
a fact.
--
Rudy Velthuis http://www.rvelthuis.de

"Grove giveth and Gates taketh away."
-- Bob Metcalfe (inventor of Ethernet) on the trend of hardware
speedups not being able to keep up with software demands
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 12:28 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Tue, 14 Oct 2014 12:26:23 -0700:

One can not
remove what was never there

Since you want to be so pedantic: Do you really have inside knowledge
that the mobile RTL was designed from scratch and that 8-bit string
types weren't removed from an existing base of code?

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 3:46 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 14 Oct 2014 12:26:23 -0700:

One can not
remove what was never there

Since you want to be so pedantic: Do you really have inside knowledge
that the mobile RTL was designed from scratch

It wasn't. Many parts of the existing RTL were re-used. How does that
matter?

--
Rudy Velthuis http://www.rvelthuis.de

"Half this game is ninety percent mental." -- Yogi Berra
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 4:17 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 14 Oct 2014 12:26:23 -0700:

One can not
remove what was never there

Since you want to be so pedantic: Do you really have inside knowledge
that the mobile RTL was designed from scratch

It wasn't. Many parts of the existing RTL were re-used. How does that
matter?

How does that matter? Really?

Why didn't they rewrite, as others are supposed to do? (Clue: because it doesn't make sense to rewrite and they're smarter than that).

Dan
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:58 PM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:

It wasn't. Many parts of the existing RTL were re-used. How does
that matter?

How does that matter? Really?

Why didn't they rewrite, as others are supposed to do?

No one ever said you should rewrite, unless you were already doing the
wrong thing, like storing binary data in strings, or ansifying your
code. The RTL doesn't do these wrong things.

The RTL does not need a big rewrite. There are, of course, some
platform-specific things and for some routines, they would have to
change AnsiStrings to byte arrays. They already started that and the
code is not much different at all.

IOW, if you used hacks, you are on your own now. The RTL didn't, so no
big rewrite necessary.

--
Rudy Velthuis http://www.rvelthuis.de

"Technology: No Place for Wimps!" -- Scott Adams
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 15, 2014 5:23 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Tue, 14 Oct 2014 15:46:23 -0700:

It wasn't. Many parts of the existing RTL were re-used. How does that
matter?

It doesn't matter. But at least a half dozen times you have told
someone that ansistrings was not "removed" because technically they
never could use it in mobile, as if that makes some kind of
difference. So, I am just pointing out to you, since you seem to care
about it, that it was indeed, technically, removed.

No, it does not matter. It changes nothing. That was my point. :-)

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 15, 2014 6:32 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Rudy Velthuis" wrote on Tue, 14 Oct 2014 15:46:23 -0700:

It wasn't. Many parts of the existing RTL were re-used. How does
that matter?

It doesn't matter.

It matters to someone. Otherwise we wouldn't see exactly the same tired
argument going back and forth for so long.

Someone just let it go.

--
Regards,
Bruce McGee
Glooscap Software
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 6:51 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

Why not continue to support the AnsiStrings unit which
works and has been tested, which is being used by applications for
years? How foolish it is to insist that Delphi developers re-write
non-UI code that has been tested and debugged in some cases for over a
decade just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally but refuses to
continue providing the unit for coders to use if they need it.

Embaradero has decided that supporting a single string type on mobile
is in their best interests, and they haven't been convinced otherwise.

I don't necessarily agree, but I also don't think it's that big a deal.

The current thrashing on the subject seems to be people insisting that
they should be able to continue to do things that they were warned not
to do over a decade ago.

If this really does affect a lot of people, then with a fraction of the
effort already spent repeating vague and questionable anecdotes over
and over and over again, a much better case could have been made. The
fact that this hasn't happened reinforces my opinion that it's not that
big a deal outside of non-tech.

--
Regards,
Bruce McGee
Glooscap Software
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:32 AM   in response to: Bruce McGee in response to: Bruce McGee
Am 12.10.2014 15:51, schrieb Bruce McGee:
Brandon Staggs wrote:

Why not continue to support the AnsiStrings unit which
works and has been tested, which is being used by applications for
years? How foolish it is to insist that Delphi developers re-write
non-UI code that has been tested and debugged in some cases for over a
decade just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally but refuses to
continue providing the unit for coders to use if they need it.

Embaradero has decided that supporting a single string type on mobile
is in their best interests, and they haven't been convinced otherwise.

I don't necessarily agree, but I also don't think it's that big a deal.

Hello,

you're of course entitled to your own opinion, but I just guess it's no
big deal for you because you're not really affected. Would it be in some
area where you'd be affected and which would require extensive rewriting
of your source code I guess you'd react differently as well.

But the really affected folks will hopefully find the new post
describuing the ways to contact EMBT and use those to express their
concerns/opinions/issues with that change directly.

Maybe that post should be declared as "sticky item" which can be done
for the web frontend afaik.

Greetings

Markus
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 10:26 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

you're of course entitled to your own opinion, but I just guess it's
no big deal for you because you're not really affected. Would it be
in some area where you'd be affected and which would require
extensive rewriting of your source code I guess you'd react
differently as well.

That's right. A lot of the code I will write for mobile will be new,
and any existing code that might be used isn't affected. At least
partly because I stopped using strings for binary buffers in the Delphi
7 time frame.

I was told that code that made assumptions about the size of a
character might stop working some time in the future.

If it did affect me directly, then that's the case I would have made to
Embarcadero, using specific examples. Since it doesn't, I expressed my
opinion and moved on to things that I do care about.

This isn't rocket science.

But the really affected folks will hopefully find the new post
describuing the ways to contact EMBT and use those to express their
concerns/opinions/issues with that change directly.

Maybe that post should be declared as "sticky item" which can be done
for the web frontend afaik.

Every one of those suggestions has been made before, so it shouldn't be
new information to anyone.

--
Regards,
Bruce McGee
Glooscap Software
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:13 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 12.10.2014 15:51, schrieb Bruce McGee:
Brandon Staggs wrote:

Why not continue to support the AnsiStrings unit which
works and has been tested, which is being used by applications for
years? How foolish it is to insist that Delphi developers re-write
non-UI code that has been tested and debugged in some cases for
over a >> decade just to achieve some "ideal" streamlined form of
"mobile delphi >> pascal" that uses these string types internally but
refuses to >> continue providing the unit for coders to use if they
need it.

Embaradero has decided that supporting a single string type on
mobile is in their best interests, and they haven't been convinced
otherwise.

I don't necessarily agree, but I also don't think it's that big a
deal.

Hello,

you're of course entitled to your own opinion, but I just guess it's
no big deal for you because you're not really affected. Would it be
in some area where you'd be affected and which would require
extensive rewriting of your source code I guess you'd react
differently as well.

Perhaps. But if I were in that situation (I can't imagine I would, BTW)
I would kick myself for not doing the right thing right away.
--
Rudy Velthuis http://www.rvelthuis.de

"We can often do more for other men by trying to correct our
own faults than by trying to correct theirs."
-- Francois Fenelon
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:38 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 14:13, schrieb Rudy Velthuis (TeamB):
Markus Humm wrote:


Hello,

you're of course entitled to your own opinion, but I just guess it's
no big deal for you because you're not really affected. Would it be
in some area where you'd be affected and which would require
extensive rewriting of your source code I guess you'd react
differently as well.

Perhaps. But if I were in that situation (I can't imagine I would, BTW)
I would kick myself for not doing the right thing right away.

How dopes this help anybody here?
Short answer: it doesn't. And some of the guys complaining here might
even have inherited that code. The world isn't as ideal as you like it
to be.

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 12:11 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

you're of course entitled to your own opinion, but I just guess
it's >> no big deal for you because you're not really affected. Would
it be >> in some area where you'd be affected and which would require
extensive rewriting of your source code I guess you'd react
differently as well.

Perhaps. But if I were in that situation (I can't imagine I would,
BTW) I would kick myself for not doing the right thing right away.

How dopes this help anybody here?
Short answer: it doesn't.

I didn't know that every reply in this thread is meant to "help people
here". Is all the nonsense you say about the hidden AnsiStrings in the
mobile runtime, trying very hard to be right in some way, also there to
"help people"?

Get off your high horse.

And no, it would never be a big deal for me. People have been warned
not to ansify their code (which includes UTF8ifying) and not to put
binary data in strings. People who heeded those warnings are barely
affected and won't understand the fuss about an alleged "need" for
AnsiString.

--
Rudy Velthuis http://www.rvelthuis.de

Gordon's First Law: If a research project is not worth doing at
all, it is not worth doing well.
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 6:48 PM   in response to: Bruce McGee in response to: Bruce McGee
"Bruce McGee" wrote on Sun, 12 Oct 2014 06:51:38 -0700:

The current thrashing on the subject seems to be people insisting that
they should be able to continue to do things that they were warned not
to do over a decade ago.

Nobody warned me a decade ago not to use UTF8 strings to store UTF8
encoded text. The type name kind of makes it implicit that is what it
is for. And when they adopted a RegEx library that requires all of
the strings to be implicitly converted to UTF8String every time you
use it, they certainly didn't imply it was deprecated either.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:17 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Bruce McGee" wrote on Sun, 12 Oct 2014 06:51:38 -0700:

The current thrashing on the subject seems to be people insisting
that they should be able to continue to do things that they were
warned not to do over a decade ago.

Nobody warned me a decade ago not to use UTF8 strings to store UTF8
encoded text.

A decade ago, UTF8String was a simple alias for AnsiString. They were
in no way more suited to contain UTF-8 encoded text than any other
AnsiString. So you could just as well have used the plain string type
and the move to UTF-16 would have been pretty easy.

--
Rudy Velthuis http://www.rvelthuis.de

"Heck, I don't age in my mind - people around me just keep
getting younger. :^)"
-- Van Swofford in e.p.delphi.non-technical
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:33 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Mon, 13 Oct 2014 05:17:16 -0700:

Brandon Staggs wrote:

"Bruce McGee" wrote on Sun, 12 Oct 2014 06:51:38 -0700:

The current thrashing on the subject seems to be people insisting
that they should be able to continue to do things that they were
warned not to do over a decade ago.

Nobody warned me a decade ago not to use UTF8 strings to store UTF8
encoded text.

A decade ago, UTF8String was a simple alias for AnsiString. They were
in no way more suited to contain UTF-8 encoded text than any other
AnsiString. So you could just as well have used the plain string type
and the move to UTF-16 would have been pretty easy.

When I said "a decade ago" I was being facetious. The main point is
that this is not all about storing binary data in string types for
convenience. I don't do that, unless you call using UTF8String to
store a string of UTF8 encoded text "abusing" a string type to
manipulate binary data.

I actually only started using UTF8String when I made the few changes
necessary to transition to Unicode and had need of it in a few areas.
I have continued to use it anywhere I need to do significant RegEx
processing for reasons already explained.

My point still stands -- UTF8String was not deprecated and nobody "10
years ago" ever said it was an abuse of UTF8String to store UTF8
encoded text in it. If the compiler spit out a warning that the type
was deprecated perhaps you would have a point. For the record,
whatever it was 10 years ago, it is NOT merely an ANSI string now.
ANSI strings have code pages associated with them. UTF8 does not,
from the perspective of the coder. (I know internally there is
technically a code page.... please, let's be adults, not children
arguing over superhero powers.)

I do get amusement from you -- first you say string types should be a
black box and I shouldn't care how they are implemented, then you try
to make an issue of how UTF8String was internally defined 10 years
ago.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 12:14 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

When I said "a decade ago" I was being facetious. The main point is
that this is not all about storing binary data in string types for
convenience. I don't do that, unless you call using UTF8String to
store a string of UTF8 encoded text "abusing" a string type to
manipulate binary data.

No, I don't.

I actually only started using UTF8String when I made the few changes
necessary to transition to Unicode and had need of it in a few areas.
I have continued to use it anywhere I need to do significant RegEx
processing for reasons already explained.

OK fine.

--
Rudy Velthuis http://www.rvelthuis.de

"If a scholar aspires to the Way but is ashamed of bad clothes
and bad food, he isn't ready to join the discussion yet."
-- Confucius
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:33 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Bruce McGee" wrote on Sun, 12 Oct 2014 06:51:38 -0700:

The current thrashing on the subject seems to be people insisting
that they should be able to continue to do things that they were
warned not to do over a decade ago.

Nobody warned me a decade ago not to use UTF8 strings to store UTF8
encoded text. The type name kind of makes it implicit that is what it
is for. And when they adopted a RegEx library that requires all of
the strings to be implicitly converted to UTF8String every time you
use it, they certainly didn't imply it was deprecated either.

Everyone was warned about making assumptions about the size of a
character, and specifically about using strings for binary data.

I used UTF-8 before Delphi 2009, when I had to explicitly convert to
and from WideStrings. I moved everything to Unicode strings as soon as
they were available, so don't have an opinion on the new versions which
have implicit conversion.

--
Regards,
Bruce McGee
Glooscap Software
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:48 AM   in response to: Bruce McGee in response to: Bruce McGee
"Bruce McGee" wrote on Mon, 13 Oct 2014 05:33:30 -0700:

Everyone was warned about making assumptions about the size of a
character, and specifically about using strings for binary data.

Which has nothing to do with why I use UTF8String.

I used UTF-8 before Delphi 2009, when I had to explicitly convert to
and from WideStrings. I moved everything to Unicode strings as soon as
they were available, so don't have an opinion on the new versions which
have implicit conversion.

One more time:

The Delphi RegEx library converts anything you send to it into
UTF8String. Every time you use it. The reason I have to be concerned
with implicit conversion is because in a few projects I make very
heavy use of RegEx, and that implicit conversion can create a serious
performance problem. And I am talking a difference of 15 minutes in
getting a batch of text processing done.

And that is not the worst of it.

Because of the way UTF8String code points are stored, you can not
count on RegEx giving you usable offsets to matches in the default
string type you are using, especially if you use that offset to
replace something in the string (in a more complex manner than the
RegEx library can allow) and want to continue to the next offset and
avoid reprocessing (and re-encoding!) the string all over again from
the beginning. The results do not match because of the INTERNAL
conversion done by RegEx in Delphi.

Both problems go away if you just use UTF8String from the beginning of
the processing to the end.

The performance problem is minor -- I would not need to use this stuff
on mobile. But being able to rely on accurate results with RegEx on
mobile is pretty big for me, in the projects where multiple languages
can appear in one string and the RegEx MUST give me correct and usable
results when I am working with Hebrew Vowel points and other things,
for example, when I need to remove the vowel points from a word
without touching the consonants over which they appear.

As I have said several times, my primary problem with the loss of
8-bit string types would not be a problem for me any longer if they
would use a RegEx library that didn't implicily convert to UTF8String
every time it was called. There are other issues (I am not crazy
about the idea of refactoring code that just works, testing it again,
etc, all just so we can conform to some purist ideal of what Delphi
Mobile Pascal should look like), but this is the big one for me.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:50 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Bruce McGee" wrote on Mon, 13 Oct 2014 05:33:30 -0700:

Everyone was warned about making assumptions about the size of a
character, and specifically about using strings for binary data.

Which has nothing to do with why I use UTF8String.

Which has nothing to do with what I was talking about.

Why are you dragging me in to an argument that I'm not making?

--
Regards,
Bruce McGee
Glooscap Software
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:40 PM   in response to: Bruce McGee in response to: Bruce McGee
Am 13.10.2014 14:50, schrieb Bruce McGee:
Brandon Staggs wrote:

"Bruce McGee" wrote on Mon, 13 Oct 2014 05:33:30 -0700:

Everyone was warned about making assumptions about the size of a
character, and specifically about using strings for binary data.

Which has nothing to do with why I use UTF8String.

Which has nothing to do with what I was talking about.

Why are you dragging me in to an argument that I'm not making?

Hello,

not all guys wanting 8 bit string support on mobile have stored binary
data in them. And said RegEx library is available in a UTF16 version as
of today if I'm not mistaken.

Greetings

Markus
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:49 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 13.10.2014 14:50, schrieb Bruce McGee:
Brandon Staggs wrote:

"Bruce McGee" wrote on Mon, 13 Oct 2014 05:33:30 -0700:

Everyone was warned about making assumptions about the size of a
character, and specifically about using strings for binary data.

Which has nothing to do with why I use UTF8String.

Which has nothing to do with what I was talking about.

Why are you dragging me in to an argument that I'm not making?

not all guys wanting 8 bit string support on mobile have stored binary
data in them.

Right.

But I was talking about people insisting ion using strings for binary
data, not about UTF-8.

And said RegEx library is available in a UTF16 version
as of today if I'm not mistaken.

I believe this is the case.

--
Regards,
Bruce McGee
Glooscap Software
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 2:11 PM   in response to: Bruce McGee in response to: Bruce McGee
"Bruce McGee" wrote on Mon, 13 Oct 2014 13:49:56 -0700:

And said RegEx library is available in a UTF16 version
as of today if I'm not mistaken.

I believe this is the case.

Indeed (well actually, not sure if it is available with a Delphi
wrapper), but since Emb has not deigned to integrate it, I am left
with two options (on desktop):

1. Continue to use the UTF-8 based perl library and just use
UTF8Strings when needed. Works perfectly.

2. Write my own bindings for the updated library, with all that
entails (debugging, refactoring existing code, etc etc), so somebody
doesn't think I am "doing it wrong" by caring how the text is encoded.

And since I would be writing bindings for object code, #2 doesn't help
with xplat, unless I felt the urge to spend the time building the
binaries for each platform and figuring out how I am to use them on
mobile.

All because exposing the UTF8String type in a unit is too "icky" for
all those millions of developers beating a path to Emb's door to use
Delphi on mobile, and they don't want to scare them away by offering a
few extra quasi-low-level variable types... types they will always
have to use internally since mobile devices can't get around needing
to consume UTF-8 and ANSI encoded text on the web.

And as an aside, since my needs are more rigorous than usual, I
actually did have to build my own 32 and 64 bit object files for the
pcre library -- the default build settings used by Emb did not give me
enough room for the really huge expressions I need in just a few
cases.... but nothing I would want to do on mobile would require that.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:55 AM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee wrote:

The current thrashing on the subject seems to be people insisting that
they should be able to continue to do things that they were warned not
to do over a decade ago.

Indeed.

--
Rudy Velthuis http://www.rvelthuis.de

"Peace is constructed, not fought for." -- Brent Davis
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:55 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally

For now, because they did not remove it from the mobile runtime yet.
AFAICT, some internal code has already been changed to use byte arrays
instead of AnsiStrings or arrays of AnsiChars though, and I guess they
will continue to do so.
--
Rudy Velthuis http://www.rvelthuis.de

"The liar's punishment is not in the least that he is not
believed, but that he cannot believe anyone else."
-- George Bernard Shaw
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2014 1:34 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 14.10.2014 20:55, schrieb Rudy Velthuis (TeamB):
Brandon Staggs wrote:

just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally

For now, because they did not remove it from the mobile runtime yet.
AFAICT, some internal code has already been changed to use byte arrays
instead of AnsiStrings or arrays of AnsiChars though, and I guess they
will continue to do so.

I wonder why they'd need arrays of AnsiChars and not WideChars?
Oh, somebody wants to save memory? So storing some string like data in
just 8 bit per char seems to be a good idea for some tasks... ;-)

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2014 4:55 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 14.10.2014 20:55, schrieb Rudy Velthuis (TeamB):
Brandon Staggs wrote:

just to achieve some "ideal" streamlined form of "mobile delphi
pascal" that uses these string types internally

For now, because they did not remove it from the mobile runtime yet.
AFAICT, some internal code has already been changed to use byte
arrays instead of AnsiStrings or arrays of AnsiChars though, and I
guess they will continue to do so.

I wonder why they'd need arrays of AnsiChars and not WideChars?

You don't give up, don't you? It is a non-problem. Unless with a hack
(that may soon become invalid), you can't use AnsiStrings in the mobile
compilers.

Some of the low level routines of the OS and for instance some POSIX
libraries use the "char *" type for C-style strings. For that, there is
MarshaledAString, which is the mobile equivalent of PAnsiChar, and
which is fully supported and for which you can even define literals
without using any hacks.

function Encoding: MarshaledAString;
begin
Result := MarshaledAString('UTF-7');
end;

That compiles and works in mobile compilers as well as in the desktop
compilers. The string 'UTF-7' is in 8-bit zero-delimited format and
readily usable by low level C-style OS or POSIX routines.

--
Rudy Velthuis http://www.rvelthuis.de

"What a cruel thing is war: to separate and destroy families and
friends, and mar the purest joys and happiness God has granted us
in this world; to fill our hearts with hatred instead of love for
our neighbors, and to devastate the fair face of this beautiful
world." -- Robert E. Lee, letter to his wife, 1864
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 7:06 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696582
@forums.embarcadero.com:

Christopher Burke wrote:

That is text manipulation. For that, you have strings.

Exactly - so to get them into strings I need the above functions.

That is the wrong way around. You should first get them into strings
(and, since you said it is ASCII, that is very easy), and then perform
the above functions.

I have to perform those functions TO BE ABLE TO GET them into strings, I
have to be able to find the relevant markers, separate out the relevant
chunks and get them into strings.

Remember - real strings don't support binary (ACK, NAK, length stuff etc).
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:55 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696582
@forums.embarcadero.com:

Christopher Burke wrote:

That is text manipulation. For that, you have strings.

Exactly - so to get them into strings I need the above functions.

That is the wrong way around. You should first get them into strings
(and, since you said it is ASCII, that is very easy), and then
perform the above functions.

I have to perform those functions TO BE ABLE TO GET them into
strings

No, you don't. Get them into strings first and then perform them on the
strings. <shrug>

--
Rudy Velthuis http://www.rvelthuis.de

"No Sane man will dance." -- Cicero (106-43 B.C.)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:20 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy wrote:

And yes, all XE version (and probably a few before that) have TEncoding,
performing all the necessary conversions between byte arrays and Unicode.

TEncoding was introduced in D2009 alongside UnicodeString.

--
Remy Lebeau (TeamB)
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2014 10:16 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy,

| String routines should not have to handle binary data, i.e. strings
| should not be used to contain binary data. Period.

+1000 - Dang straight!!!

--

Q

1.19.1.372 (Q's Broken Toolbar.)
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 10:06 AM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll <qcorrell at pacNObell dot net> wrote in news:693987
@forums.embarcadero.com:

Rudy,

| String routines should not have to handle binary data, i.e. strings
| should not be used to contain binary data. Period.

+1000 - Dang straight!!!

I agree - however what we should do needs to also consider what we must do,
and that is deliver customer requirements.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:17 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

I agree - however what we should do needs to also consider what we
must do, and that is deliver customer requirements.

Who says you can't?

--
Rudy Velthuis http://www.rvelthuis.de

"All propaganda must be so popular and on such an intellectual
level, that even the most stupid of those toward whom it is
directed will understand it ... Through clever and constant
application of propaganda, people can be made to see paradise
as hell, and also the other way around, to consider the most
wretched sort of life as paradise."
-- Adolf Hitler
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 12:29 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:693877
@forums.embarcadero.com:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

Agreed, and once you can convince the 10 or so vendors my software has to
deal with of this - I'll gladly obey.

Until then - I need the ability to perform dispicable acts just to write my
software.
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 2:48 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:693877
@forums.embarcadero.com:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

Agreed, and once you can convince the 10 or so vendors my software
has to deal with of this - I'll gladly obey.

Changes will happen whether you "obey" or not.

Until then - I need the ability to perform dispicable acts just to
write my software.

Have at it.

--
Regards,
Bruce McGee
Glooscap Software
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2014 4:37 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:693877
@forums.embarcadero.com:

String routines should not have to handle binary data, i.e. strings
should not be used to contain binary data. Period.

Agreed, and once you can convince the 10 or so vendors my software
has to deal with

Your vendors store binary data in strings? Could you name a few names?

--
Rudy Velthuis http://www.rvelthuis.de

"Ah well, then I suppose I shall have to die beyond my means."
-- Oscar Wilde, dying words
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 2:04 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694130
@forums.embarcadero.com:

Your vendors store binary data in strings? Could you name a few names?

The following either story binary data within short strings, or do not
support non Ansi Strings.

Cougar, Ease, Micros, RoomMaster,MaxETag for the service vendors.

Also various Room Charging systems requiring straight ANSI text files.

Proximity readers (Serial), Certain older ESCPOS Printers, Some serial Card
readers.

Some of the systems I'm integrating with were build in 1995. Many of them
moved standard serial protocols to TCP/IP without altering the actual
protocol proper.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2014 12:16 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694130
@forums.embarcadero.com:

Your vendors store binary data in strings? Could you name a few
names?

The following either story binary data within short strings, or do
not support non Ansi Strings.

Cougar, Ease, Micros, RoomMaster,MaxETag for the service vendors.

Never heard of them. Hmmm...

Which of these stores binary data in strings?

Also various Room Charging systems requiring straight ANSI text files.

Ansi text files, or actually text files in any encoding, should not be
a problem. But do they store binary data in strings?

--
Rudy Velthuis http://www.rvelthuis.de

"The question of whether a computer can think is no more
interesting than the question of whether a submarine can swim."
-- Edsger Dijkstra
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 12:01 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694525
@forums.embarcadero.com:

Christopher Burke wrote:
Which of these stores binary data in strings?

Most of them, because they implement serial protocols over TCP/IP or
require serial handshaking - they frequently put things like
ACK/NAK/SOH/SOT characters in the middle of the string of text that comes
back, They frequetly store length bytes/words midd string as well.

Also various Room Charging systems requiring straight ANSI text files.

Ansi text files, or actually text files in any encoding, should not be
a problem. But do they store binary data in strings?

Not the text files, and btw - the ANSI text files have been a problem (i.e.
XE6 TSTringlist couldn't handle saving them correctly for the other systems
to read).

The serial port and serial port TCP/IP hacks do the storing of binary data
in strings, the text files just don't work on the default wide char
TSTringlists (which I'm assuming is written correctly), but they (as of
this stage) don't store binary data in the strings.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 1:59 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694525
@forums.embarcadero.com:

Christopher Burke wrote:
Which of these stores binary data in strings?

Most of them, because they implement serial protocols over TCP/IP or
require serial handshaking - they frequently put things like
ACK/NAK/SOH/SOT characters in the middle of the string of text that
comes back, They frequetly store length bytes/words midd string as
well.

Horror. I would try to get rid of such libraries.

Also various Room Charging systems requiring straight ANSI text
files.

Ansi text files, or actually text files in any encoding, should not
be a problem. But do they store binary data in strings?

Not the text files, and btw - the ANSI text files have been a problem
(i.e. XE6 TSTringlist couldn't handle saving them correctly for the
other systems to read).

If the files are pure text, it should work, if you use the Encoding
parameters to load and save.

--
Rudy Velthuis http://www.rvelthuis.de

"A man can't get rich if he takes proper care of his family."
- Navaho saying.
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 9:38 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694801
@forums.embarcadero.com:


Horror. I would try to get rid of such libraries.

LOL - so I just tell all my customers to close all their hotels and go
home.

You really have no idea do you :)

If the files are pure text, it should work, if you use the Encoding
parameters to load and save.

Yeah - 'should', my Delphi Help should work too but it doesn't. I don't get
to write code with should, only with does.
> Rich <

Posts: 171
Registered: 2/6/09
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 12:42 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

LOL - so I just tell all my customers to close all their hotels and go
home.

I think he's suggesting that you re-write the code.

Yeah - 'should', my Delphi Help should work too but it doesn't. I don't get
to write code with should, only with does.

From your post it appears you many be struggling with design not coding issues. An example to clarify would be:

Via TCP/IP you get some information come in and it says a string will come next and will be 100bytes long. But when the string gets here it's actually some other binary data not a string containing characters at all.

Which is the problem we are describing. Data is labeled as string but is not. So somebody is hacking some stuff instead of taking the time to design properly.
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 7:32 AM   in response to: > Rich < in response to: > Rich <
Rich < &lt;&gt; wrote in news:694938 at forums dot embarcadero dot com:

Christopher Burke wrote:

LOL - so I just tell all my customers to close all their hotels and
go home.

I think he's suggesting that you re-write the code.

It isn't my code.... that's the problem. Matter of fact for some of them,
the code can't be rewritten without government approval.

Yeah - 'should', my Delphi Help should work too but it doesn't. I
don't get to write code with should, only with does.

From your post it appears you many be struggling with design not
coding issues. An example to clarify would be:

Correct - however the design issues are out of my hands.

Via TCP/IP you get some information come in and it says a string will
come next and will be 100bytes long. But when the string gets here
it's actually some other binary data not a string containing
characters at all.

Incorrect - it is a sequence of 8 bit characters with tags and other binary
information embedded.

Which is the problem we are describing. Data is labeled as string
but is not. So somebody is hacking some stuff instead of taking the
time to design properly.

It is in fact a string - as in a sequence of 8 bit characters.

Of course - as I said earlier by performing various blood sacrifices and
doing some really nasty code, I can in fact rewrite Ansistrings allowing me
to do all the work.

That however doesn't remove the requirement of ansistrings, it just means I
had to write it.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:38 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rich < &lt;&gt; wrote in news:694938 at forums dot embarcadero dot com:

Christopher Burke wrote:

LOL - so I just tell all my customers to close all their hotels and
go home.

I think he's suggesting that you re-write the code.

It isn't my code.... that's the problem. Matter of fact for some of
them, the code can't be rewritten without government approval.

Heheh, when I wrote about software that needed government approval
(like German dental software), someone started talking about
protectionism. <g>

--
Rudy Velthuis http://www.rvelthuis.de

"Man is certainly stark mad: he cannot make a worm, yet he will
make gods by the dozen."
-- Michel de Montaigne
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 6:21 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:695231
@forums.embarcadero.com:

It isn't my code.... that's the problem. Matter of fact for some of
them, the code can't be rewritten without government approval.

Heheh, when I wrote about software that needed government approval
(like German dental software), someone started talking about
protectionism. <g>

A big one for us is an interface to a major gambling system (allows
interaction between point of sale software and the customer's poker
machine).

These gambling interfaces that deal with gambling/betting are from late 90s
era, documented in early 2000s.

The primary issue is getting stuff which is Ansi(technically ASCII) into
the normal strings within Delphi. That process itself requires ansi
strings.

I suspect people assume I want to work with Ansi strings - couldn't be
further from the truth, however just getting them from point A to point B
requires ansi strings to do.

That is a HUGE hurdle to overcome.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:02 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

The primary issue is getting stuff which is Ansi(technically ASCII)
into the normal strings within Delphi.

That does not require AnsiStrings. You can do the storage with byte
arrays. You can do the text manipulation with UnicodeStrings.

Read up about TEncoding for the conversion. It will convert between
byte arrays (any known codepage) and UnicodeString.

And if your content is really just 7-bit ASCII, you can even take a few
shortcuts, since this directly maps to the same index code points in
Unicode. IOW, #$20 maps to #$0020, etc., up to #$7F.

function ASCIIToUnicode(ASCII: array of Byte): string;
var
I: Integer;
begin
// add integrity checks if required
SetLength(Result, Length(ASCII));
for I := Low(ASCII) to High(ASCII) do
Result[I] := Chr(ASCII[I]);
end;

--
Rudy Velthuis http://www.rvelthuis.de

"I'm always amazed to hear of air crash victims so badly
mutilated that they have to be identified by their dental
records. What I can't understand is, if they don't know who you
are, how do they know who your dentist is?" -- Paul Merton.
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:39 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696571
@forums.embarcadero.com:

Christopher Burke wrote:

The primary issue is getting stuff which is Ansi(technically ASCII)
into the normal strings within Delphi.

That does not require AnsiStrings. You can do the storage with byte
arrays. You can do the text manipulation with UnicodeStrings.

You seem to be a little slow, here is the information again, maybe if I
repeat it a million times it will get through.

I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 3:02 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

You seem to be a little slow,

Yeah, sure. It is Sunday morning after all.

here is the information again, maybe if
I repeat it a million times it will get through.

I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.

No, you don't. YOU REQUIRE ANSI-ENCODED DATA FOR EXTERNAL INTERFACES.
That can just as well be a byte array.

OH, and that was not nearly a million times. <g>

--
Rudy Velthuis http://www.rvelthuis.de

"Two attitudes are all that is needed; do not harm anything,
say and do things that make others happy."
-- dreamslaughter
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:35 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 12.10.2014 12:02, schrieb Rudy Velthuis (TeamB):
Christopher Burke wrote:

You seem to be a little slow,

Yeah, sure. It is Sunday morning after all.

here is the information again, maybe if
I repeat it a million times it will get through.

I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.

No, you don't. YOU REQUIRE ANSI-ENCODED DATA FOR EXTERNAL INTERFACES.
That can just as well be a byte array.

OH, and that was not nearly a million times. <g>

One thing to note: ANSI strings would make these things easier! ;-)
(after doing some manipulation on them to deal with some specific things
he might convert them to normal strings then and continue to work with
those).

Yes, XE7 has more functionality for byte arrays now which is welcome,
but I'm not yet sure how far that goes.

Greetings

Markus
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:01 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm <markus dot humm at freenet dot de> wrote in news:696624
@forums.embarcadero.com:

One thing to note: ANSI strings would make these things easier! ;-)

However you do it, you will end up using an ansi string library, even if it
is one you write yourself.

That's the point.

Yes, XE7 has more functionality for byte arrays now which is welcome,
but I'm not yet sure how far that goes.

It provides a very small underlying set of tools for writing one's own
Ansistring library ... but that doesn't solve other libraries use of said
library.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:21 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Markus Humm <markus dot humm at freenet dot de> wrote in news:696624
@forums.embarcadero.com:

One thing to note: ANSI strings would make these things easier! ;-)

However you do it, you will end up using an ansi string library

No. Get the text into the default string type, get the binary data as
such and there is no need to have an AnsiString or similar library.
--
Rudy Velthuis http://www.rvelthuis.de

"If you have enough book space, I don't want to talk to you."
-- Terry Pratchett
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 11:55 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Markus Humm <markus dot humm at freenet dot de> wrote in news:696624
@forums.embarcadero.com:

One thing to note: ANSI strings would make these things easier! ;-)

However you do it, you will end up using an ansi string library

Nope. A library like Indy does not use an AnsiString library and it
handles many different protocols without any problems.

If you say: "I don't want to do it without AnsiStrings", that's fine.
But don't tell me it is impossible without them. It definitely isn't.
It is not even a lot more work.

--
Rudy Velthuis http://www.rvelthuis.de

"Earth provides enough to satisfy every man's need, but not
every man's greed."
--Mohandas Gandhi
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:20 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 12.10.2014 12:02, schrieb Rudy Velthuis (TeamB):
Christopher Burke wrote:

You seem to be a little slow,

Yeah, sure. It is Sunday morning after all.

here is the information again, maybe if
I repeat it a million times it will get through.

I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.

No, you don't. YOU REQUIRE ANSI-ENCODED DATA FOR EXTERNAL
INTERFACES. That can just as well be a byte array.

OH, and that was not nearly a million times. <g>

One thing to note: ANSI strings would make these things easier! ;-)

No, they would not, unless you do it his way: first manipulate them as
AnsiString and then get them into strings. I don't quite see why that
is necessary. First get the text data into strings and then, well, do
text manipulation with the strings.
--
Rudy Velthuis http://www.rvelthuis.de

"A man loses his illusions first, his teeth second, and his
follies last." -- Helen Rowland
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:45 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

You seem to be a little slow, here is the information again, maybe
if I repeat it a million times it will get through.

I REQUIRE ANSI STRINGS FOR EXTERNAL INTERFACES.

NO, YOU DO NOT (a million times). You require access to ANSI/8bit data,
not ANSI strings. Bytes arrays can provide that same access, and there
are ways to convert between Byte arrays and Delphi's native String type (TEncoding,
UnicodeFromLocaleChars(), LocaleCharsFromUnicode(), etc). And in the specific
case where you need to call external library functions that take Ansi/8bit
parameters, there is TMarshal, TPtrWrapper, and MarshaledAString data types
provided by the RTL for that very purpose.

Everytime you think about saying that you require AnsiString, look at Indy's
source code first. It has already dealt with the delemna of working with
Ansi/8bit data in mobile platforms when interacting with protocols and external
libraries. ANSISTRING IS NOT **REQUIRED**, IT IS **CONVENIENT**.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:36 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

A big one for us is an interface to a major gambling system (allows
interaction between point of sale software and the customer's poker
machine).

Does that require mobile support?

The primary issue is getting stuff which is Ansi(technically ASCII)
into the normal strings within Delphi. That process itself requires
ansi strings.

The RTL provides classes and APIs for converting between bytes and characters
without using AnsiString itself. If you have an array of bytes in memory,
you can convert it to an array of WideChars or a UnicodeString, and vice
versa. At the interface layer where you directly interact with an external
system, simply treat 8bit data as bytes rather than as AnsiChar. It will
work fine.

--
Remy Lebeau (TeamB)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:35 PM   in response to: > Rich < in response to: > Rich <
Rich wrote:

Christopher Burke wrote:

LOL - so I just tell all my customers to close all their hotels and
go home.

I think he's suggesting that you re-write the code.

Or find a better alternative for the libraries.

--
Rudy Velthuis http://www.rvelthuis.de

"He uses statistics as a drunken man uses lamp-posts...
for support rather than illumination."
-- Andrew Lang (1844-1912)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:35 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694801
@forums.embarcadero.com:


Horror. I would try to get rid of such libraries.

LOL - so I just tell all my customers to close all their hotels and
go home.

Getting rid of a library does not mean that I would not look for a
better replacement.


You really have no idea do you :)

Strawman. I never said they should abandon their software and their
business. Sheesh!

--
Rudy Velthuis http://www.rvelthuis.de

"Look at you in war. There has never been a just one, never
an honorable one, on the part of the instigator of the war."
-- Mark Twain
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 11:13 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

Most of them, because they implement serial protocols over TCP/IP or
require serial handshaking - they frequently put things like
ACK/NAK/SOH/SOT characters in the middle of the string of text that
comes back, They frequetly store length bytes/words midd string as
well.

Such protocols are binary and should be handled using byte buffers instead
of string buffers.

Not the text files, and btw - the ANSI text files have been a problem
(i.e. XE6 TSTringlist couldn't handle saving them correctly for the
other systems to read).

TStringList has public Encoding and DefaultEncoding properties, and TStringList.SaveTo...()
has an optional Encoding parameter. If you don't specify an encoding to
save as, TStringList.Encoding is used if it is not nil (such as if TStringList.LoadFrom...()
was previously called), otherwise TStringList.DefaultEncoding is used instead
(it is set to TEncoding.Default by default). It is your responsibility to
specify a proper Encoding for TStringList to save its content as.

--
Remy Lebeau (TeamB)
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 10:34 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:694912 at forums dot embarcadero dot com:

Christopher wrote:

Most of them, because they implement serial protocols over TCP/IP or
require serial handshaking - they frequently put things like
ACK/NAK/SOH/SOT characters in the middle of the string of text that
comes back, They frequetly store length bytes/words midd string as
well.

Such protocols are binary and should be handled using byte buffers
instead of string buffers.

Such protocols are actually strings, and rewriting ansistrings and all the
libraries depending on them is not an option.


Not the text files, and btw - the ANSI text files have been a problem
(i.e. XE6 TSTringlist couldn't handle saving them correctly for the
other systems to read).

TStringList has public Encoding and DefaultEncoding properties, and
TStringList.SaveTo...() has an optional Encoding parameter.

AS I said the target application didn't load them, no idea why - so ansi
strings and old file ops to the rescue :)

Lots of stuff Delphi is suppossed to do it doesn't, and given I don't have
ny documentation apart from google - it is somewhat hard to tell the
difference.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:39 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Such protocols are binary and should be handled using byte buffers
instead of string buffers.

Such protocols are actually strings

Currently being the main author of Indy, I guess Remy knows how most
protocols look. <g>

--
Rudy Velthuis http://www.rvelthuis.de

"Far too many development shops are run by fools who succeed
despite their many failings." -- Brion L. Webster
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 1:11 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy wrote:

Currently being the main author of Indy, I guess Remy knows how most
protocols look. <g>

Not just from that, but I do deal with serialport-based communication protocols
in my day job. So yeah, there is a difference between text-based protocols
and binary-based protocols. If a protocol utilizes ACK/NAK/SOH/SOT then
it is not a text protocol, it is a binary protocol, even if it has textual
elements within it.

--
Remy Lebeau (TeamB)
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 11:42 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:695409 at forums dot embarcadero dot com:

Not just from that, but I do deal with serialport-based communication
protocols in my day job. So yeah, there is a difference between
text-based protocols and binary-based protocols. If a protocol
utilizes ACK/NAK/SOH/SOT then it is not a text protocol, it is a
binary protocol, even if it has textual elements within it.

The protocol is defined by the vendor, I implement the protocol.

The protocol is a text based protocol, with binary elements in it.

That is - if the vendor's systems were written correctly, I'd be using raw
text in between looking for various flags (e.g. NAK or SOH etc), however
they aren't - they are a hacked together bastardised abortion of code
ported from serial to TCP/IP.

So - now I reiterate, they are TEXT protocols running over TCP/IP with
embedded BINARY elements.

I do hope everyone gets this fact.

Note that Mobile makes two changes to strings, zerobased strings and
removal of ansi strings.

Note also the difference - zero based strings is a pain in the butt,
requires me to rewrite half my code base, however IT IS POSSIBLE TO DO.

Lack of ansi based strings removes the POSSIBILITY of porting the code, and
that is only like 2% of my code (just a rather critical 2%).

I am not here whinging about the pain in the butt change to half my code,
I'm here whinging about the bit that makes it IMPOSSIBLE to change 2% of my
code (which can't be done without Ansi String support).
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 12:47 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

The protocol is defined by the vendor, I implement the protocol.

The protocol is a text based protocol, with binary elements in it.

Since a serial port (or a socket) has no concept of text, only bytes, it
could also be thought of as a binary protocol with text elements. And that
is how you should implement it

Lack of ansi based strings removes the POSSIBILITY of porting the
code

No, it does not. You simply have to read inbound data as bytes instead of
text, and then convert the bytes to strings when needed. And when sending
outbound data, convert strings to bytes and send as bytes. It is not that
hard to deal with, especially if you have properly separated your higher
level protocol logic from your lower level transmission logic. Then all
you have to change is the transmission portion without changing the protocol
portion.

I am not here whinging about the pain in the butt change to half my
code, I'm here whinging about the bit that makes it IMPOSSIBLE to
change 2% of my code (which can't be done without Ansi String
support).

You DO NOT need AnsiString support to send/receive data over a serial port
(or socket).

--
Remy Lebeau (TeamB)
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 2:15 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:696367 at forums dot embarcadero dot com:

Christopher wrote:

The protocol is defined by the vendor, I implement the protocol.

The protocol is a text based protocol, with binary elements in it.

Since a serial port (or a socket) has no concept of text, only bytes,
it could also be thought of as a binary protocol with text elements.
And that is how you should implement it

It is no longer on a serial port, it is on TCP/IP. What part of that are
you missing ?


Lack of ansi based strings removes the POSSIBILITY of porting the
code

No, it does not.

I think you don't understand English. Yes it does is the correct statement.

You DO NOT need AnsiString support to send/receive data over a serial
port (or socket).

LOL ... are all TeamB members trolls now.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 5:04 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

Lack of ansi based strings removes the POSSIBILITY of porting the
code
No, it does not.
I think you don't understand English. Yes it does is the correct
statement.

No, the lack of AnsiString support DOES NOT remove the possibility of porting
your code to mobile. Indy is proof of that. It relies heavily on string
processing, but NONE of its reading/writing logic depends on AnsiString in
Unicode/Mobile versions of Delphi/C++Builder, it only knows about UnicodeString.
When reading, raw bytes are read and then converted to UnicodeString. When
sending, UnicodeString is converted to raw bytes and then sent. This is
how ANY data exchange across environment boundaries should be handled - whether
that is over sockets, serial ports, files, whatever. There is NOTHING preventing
your code from being able to do that in a mobile environment. If you think
you have a piece of code that CANNOT be ported, then show that code and someone
will show you how it CAN be ported.

--
Remy Lebeau (TeamB)
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 7:51 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:696399 at forums dot embarcadero dot com:

Christopher wrote:

Lack of ansi based strings removes the POSSIBILITY of porting the
code
No, it does not.
I think you don't understand English. Yes it does is the correct
statement.

No, the lack of AnsiString support DOES NOT remove the possibility of
porting your code to mobile.

It does, it has - this is FACT.

Your incorrect opinion does NOT change the facts.

No matter how awesome you are, no matter that you have the TeamB logo.

If you were GOD - it would not change the facts.

Ansi string removal forced us to abandon mobile development.

Don't be so arrogant as to think you KNOW EVERYTHING about EVERY PROJECT.

So stop being a bastard, and act like your TeamB tag suggests ok.
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 10:48 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

So stop being a bastard, and act like your TeamB tag suggests ok.

What is wrong with you?

--
Regards,
Bruce McGee
Glooscap Software
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:19 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the possibility
of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your code
to mobile.

And if you did not commit the sins you were warned against (i.e. using
AnsiStrings for binary data, or "ansifying" your string code), it is
even quite simple and straightforward.

And you are still able to read in and write out data that is in 8-bit
format, be it ASCII, ANSI, UTF-8, some other MBCS, EBCDIC, etc. You
just convert it from (or to) byte data first.
--
Rudy Velthuis http://www.rvelthuis.de

"I do not feel obliged to believe that the same God who has
endowed us with sense, reason, and intellect has intended us to
forgo their use."
-- Galileo Galilei
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:37 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696576
@forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the possibility
of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your code
to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,... etc out
ability to move to mobile.

FULL STOP, that is the end.

In other words, you ARE WRONG!!!
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 3:03 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696576
@forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the
possibility >> > of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your
code to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,...
etc out ability to move to mobile.

NO, IT DOES NOT. Clear enough?

--
Rudy Velthuis http://www.rvelthuis.de

"I am amazed how many people on this planet are happy and free
and never even saw the US constitution."
-- <Reason>
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:44 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 12.10.2014 12:03, schrieb Rudy Velthuis (TeamB):
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696576
@forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the
possibility >> > of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your
code to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,...
etc out ability to move to mobile.

NO, IT DOES NOT. Clear enough?

I fear we won't get anywehre with him unless he shows us some code and
we show him how to change it. But it looks like he doesn't want to get
that or alternatively it's not the issue about how to change the code
but rather "I don't get the time to change it or to adapt the tests" or
something like this. But if it's the latter he didn't tell us either.

Greetings

Markus
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:28 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm <markus dot humm at freenet dot de> wrote in news:696628
@forums.embarcadero.com:

I fear we won't get anywehre with him unless he shows us some code and
we show him how to change it.

The ANSI Code challenge posted
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:30 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 12.10.2014 12:03, schrieb Rudy Velthuis (TeamB):
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in
news:696576 >> @forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the
possibility >> > of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your
code to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,...
etc out ability to move to mobile.

NO, IT DOES NOT. Clear enough?

I fear we won't get anywehre with him unless he shows us some code and
we show him how to change it. But it looks like he doesn't want to get
that or alternatively it's not the issue about how to change the code
but rather "I don't get the time to change it or to adapt the tests"
or something like this. But if it's the latter he didn't tell us
either.

In all the time he has been posting here, he could probably have
finished the conversion already. <g>

Perhaps he doesn't know how?

FWIW, reading and writing all kinds of protocols, which often have text
and binary elements, can be done on all kinds of mobile devices,
including the ones supported by Delphi, i.e. the ones using iOS or
Android on ARM. These other programs were written in languages that
don't have AnsiStrings either (but data blobs or byte arrays), and both
have 16 bit strings, and yet these people manage.

So no, AnsiStrings are not required to do what he wants on a mobile
device, not with Delphi and not with any other language.
--
Rudy Velthuis http://www.rvelthuis.de

"Don't try to teach a pig to sing, it can't be done and it only
ticks off the pig."
-- Robert Heinlein
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:42 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 14:30, schrieb Rudy Velthuis (TeamB):


Perhaps he doesn't know how?

FWIW, reading and writing all kinds of protocols, which often have text
and binary elements, can be done on all kinds of mobile devices,
including the ones supported by Delphi, i.e. the ones using iOS or
Android on ARM. These other programs were written in languages that
don't have AnsiStrings either (but data blobs or byte arrays), and both
have 16 bit strings, and yet these people manage.

So no, AnsiStrings are not required to do what he wants on a mobile
device, not with Delphi and not with any other language.

Hello,

it's bnot about that it couldn't be done, but it's sometimes also a
matter of "efficiency" and with that I don't necesarrily mean CPU cycles!

Greetings

Markus
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:42 AM   in response to: Christopher Burke in response to: Christopher Burke
Am 12.10.2014 11:37, schrieb Christopher Burke:
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696576
@forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the possibility
of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your code
to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,... etc out
ability to move to mobile.

FULL STOP, that is the end.

In other words, you ARE WRONG!!!

Hello,

you didn't tell us why that's the case. The case is not on a technical
level. It can be done technically. Just post some snippets of the code
you think to be not portable and we'll show you hot to do it.

Simply stop shouting etc. and get constructive.
I'm as well against removing those 8 bit strings from mobile (before
Rudy now tells us they were not removed: no Rudy, if they can surfaced
by a hack they are there), but I'm well aware that there are some ways
around the issues. They simply might not be as convenient as Ansistrings.

Greetings

Markus
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:22 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm <markus dot humm at freenet dot de> wrote in
news:696627 at forums dot embarcadero dot com:

you didn't tell us why that's the case.

Posting a new topic..

"The ANSI String Challenge"
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:13 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 12.10.2014 11:37, schrieb Christopher Burke:
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696576
@forums.embarcadero.com:

Christopher Burke wrote:

No, the lack of AnsiString support DOES NOT remove the
possibility >>>> of porting your code to mobile.

It does, it has - this is FACT.

It is possible, and that is a fact. As Remy said, the lack of
AnsiString support DOES NOT remove the possibilty of porting your
code >> to mobile.
Ok - to clarify.

Lack of ANSI STRINGS prohibits, stops, disallows, bars, cancels,...
etc out ability to move to mobile.

FULL STOP, that is the end.

In other words, you ARE WRONG!!!

Hello,

you didn't tell us why that's the case. The case is not on a technical
level. It can be done technically. Just post some snippets of the code
you think to be not portable and we'll show you hot to do it.

Simply stop shouting etc. and get constructive.
I'm as well against removing those 8 bit strings from mobile (before
Rudy now tells us they were not removed: no Rudy, if they can surfaced
by a hack they are there)

They were not removed. First of all, if you say they are there, they
were not removed. But the runtime for the mobile compilers never
surfaced them, for good reasons, so they were never "there", even if
they are used internally (for the moment).
--
Rudy Velthuis http://www.rvelthuis.de

"Fantasy is an exercise bicycle for the mind. It might not take you
anywhere, but it tones up the muscles that can. Of course, I could
be wrong."
-- Terry Pratchett
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:45 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 12:13, schrieb Rudy Velthuis (TeamB):
Markus Humm wrote:


Simply stop shouting etc. and get constructive.
I'm as well against removing those 8 bit strings from mobile (before
Rudy now tells us they were not removed: no Rudy, if they can surfaced
by a hack they are there)

They were not removed. First of all, if you say they are there, they
were not removed. But the runtime for the mobile compilers never
surfaced them, for good reasons, so they were never "there", even if
they are used internally (for the moment).

Hello,

ok once again Rudy: even if they are only there internally they are
there. There means there. Otherwise you would explicitely need to write
"were never in the public interface of the RTL".

If they weren't there the hack couldn't surface them, otherwise the hack
would need to recode them which even you seem to admit is not being done
by the mentioned hack.

Get over the fact that they're there internally and just have not been
surfaced publically and that this means they are there on mobile. Just
not immediatelly useable by us normal users without any hack.

Greetings

Markus
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:40 AM   in response to: Christopher Burke in response to: Christopher Burke
Am 11.10.2014 04:51, schrieb Christopher Burke:
Remy Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:696399 at forums dot embarcadero dot com:

Christopher wrote:

Lack of ansi based strings removes the POSSIBILITY of porting the
code
No, it does not.
I think you don't understand English. Yes it does is the correct
statement.

No, the lack of AnsiString support DOES NOT remove the possibility of
porting your code to mobile.

It does, it has - this is FACT.

Your incorrect opinion does NOT change the facts.

No matter how awesome you are, no matter that you have the TeamB logo.

If you were GOD - it would not change the facts.

Ansi string removal forced us to abandon mobile development.

Don't be so arrogant as to think you KNOW EVERYTHING about EVERY PROJECT.

So stop being a bastard, and act like your TeamB tag suggests ok.

Hello,

sorry, but you're wrong. Having no ANsiString support causes the need
for you to rewirte that portion of code. Yes. But it can be rewritten.

Is it as simple as your current AnsiString based version then? I don't
think so. But it can be done, definitively! Show the offending code and
we prove it to you!

(afaik Delphi still is a touring complete language, with or without
AssiString support!)

Greetings

Markus
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:02 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm <markus dot humm at freenet dot de> wrote in
news:696626 at forums dot embarcadero dot com:


Hello,

sorry, but you're wrong.

Well, stopped reading there as I'm not.

I am in fact correct, 120% correct.
Nick Hodges

Posts: 2,414
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:11 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

I am in fact correct, 120% correct.

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

--
Nick
Delphi Programming is Fun
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:33 PM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges <nickhodges at gmail dot com> wrote in news:696673
@forums.embarcadero.com:

Christopher Burke wrote:

I am in fact correct, 120% correct.

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

C# and Java don't ... matter of fact any VM style language (C#/Java)
completely screws up with these systems.

However, C++ does in fact have 'char' data type and the library functions
for supporting char strings.

You have to remember, we are dealing with poorly designed and often multi-
version (due to coders over the years misimplementing the protocols)
interfaces here.

It is all well and good in a perfect world to get rid of the grungy ansi
strings.

Don't live there.

I live in a world where Atom processors and Windows XP are still mainstream
and will be for years to come.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:37 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

C# and Java don't

ROTFL! Are you saying they can't implement and use your protocol?

That would be hilarious if it weren't so sad. Of course they can.

--
Rudy Velthuis http://www.rvelthuis.de

"Imitation is the sincerest form of television."
-- Fred Allen (1894-1956)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:46 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 14:37, schrieb Rudy Velthuis (TeamB):
Christopher Burke wrote:

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

C# and Java don't

ROTFL! Are you saying they can't implement and use your protocol?

That would be hilarious if it weren't so sad. Of course they can.

Hello,

if they're Touring complete they surely can I think. ;-)

Greetings

Markus
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 7:00 PM   in response to: Nick Hodges in response to: Nick Hodges
"Nick Hodges" wrote on Sun, 12 Oct 2014 14:11:30 -0700:

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

Don't know about C++ (kinda doubt you are right) but as for C# and
Java -- wanna bet that the frameworks have internal strings types that
don't encode to UTF8 with every little RegEx call and back to UTF-16
and return invalid or unusable offsets when the code points don't
match up with even byte offsets?

Aside from offset results that can only be considered wrong, using the
default Delphi string type and Regex library I have had regex
processing of a large block of text take 15 MINUTES on a 4 gigahertz
processor with 32 gigs of RAM. Switching to using UTF8 for all of the
related strings brought it down to SECONDS.

I imagine C# and Java "manage" without those kinds of trade-offs.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:38 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

"Nick Hodges" wrote on Sun, 12 Oct 2014 14:11:30 -0700:

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

Don't know about C++ (kinda doubt you are right)

Except for C++Builder, there is no standard C++ which has AnsiStrings.
That is a fact you can easily check.
--
Rudy Velthuis http://www.rvelthuis.de

"He is one of those people who would be enormously improved by
death." -- H. H. Munro (Saki) (1870-1916)
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:53 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Mon, 13 Oct 2014 05:38:22 -0700:

Brandon Staggs wrote:

"Nick Hodges" wrote on Sun, 12 Oct 2014 14:11:30 -0700:

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

Don't know about C++ (kinda doubt you are right)

Except for C++Builder, there is no standard C++ which has AnsiStrings.
That is a fact you can easily check.

Fine -- I did google it first and saw all sorts of "ansi string class
for C++" results pop up, so obviously people need it and can use one
if necessary.

I guess your point is that Delphi should not have anything in its RTL
that isn't also found in other language default libraries?

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 7:26 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:

I guess your point is that Delphi should not have anything in its RTL
that isn't also found in other language default libraries?

I am merely saying that it is well possible and no big problem to do
without, like hundreds of thousands of other programmers do. So anyone
claiming that one can't do this or that without AnsiString is deceiving
him- or herself.

--
Rudy Velthuis http://www.rvelthuis.de

"My mother said to me, "If you are a soldier, you will become a
general. If you are a monk, you will become the Pope." Instead,
I was a painter, and became Picasso." -- Pablo Picasso.
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 11:06 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
"Rudy Velthuis" wrote on Mon, 13 Oct 2014 07:26:08 -0700:

Brandon Staggs wrote:

I guess your point is that Delphi should not have anything in its RTL
that isn't also found in other language default libraries?

I am merely saying that it is well possible and no big problem to do
without, like hundreds of thousands of other programmers do. So anyone
claiming that one can't do this or that without AnsiString is deceiving
him- or herself.

Well I must agree with that, as far as it goes. But I don't agree
with the stated reasons for deliberately walling of 8-bit strings from
mobile development -- the code exists and works, and there is a lot of
existing production code that would NOT have to be re-written and
re-debugged if they would simply provide the unit for it.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 12:12 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon Staggs wrote:
"Rudy Velthuis" wrote on Mon, 13 Oct 2014 07:26:08 -0700:

Brandon Staggs wrote:

I guess your point is that Delphi should not have anything in its RTL
that isn't also found in other language default libraries?

I am merely saying that it is well possible and no big problem to do
without, like hundreds of thousands of other programmers do. So anyone
claiming that one can't do this or that without AnsiString is deceiving
him- or herself.

Well I must agree with that, as far as it goes. But I don't agree
with the stated reasons for deliberately walling of 8-bit strings from
mobile development -- the code exists and works, and there is a lot of
existing production code that would NOT have to be re-written and
re-debugged if they would simply provide the unit for it.

Correct. It is not about strings per se. It's about the language or, more to the point, existing code.

Regardless of pure motives, forcing existing users to rewrite code will affect the baseline customer who routinely upgrades, though not on every release. When users can see the benefits of additional features, without having to rewrite (or fear misbehavior) of their existing code they will upgrade. The need to rewrite places a huge hurdle in the path that requires a very large benefit to overcome.

The business case is for Embarcadero... how important is "recurring revenue" to their business, and how long will it take for that to fall off? I don't know that.

Dan
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:06 PM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:

The business case is for Embarcadero

You're probably in a better position to speak about your business than
Embarcaero's.

how important is "recurring
revenue" to their business, and how long will it take for that to
fall off?

Interesting leap you made there.

I'm not sure it's based in reality, though.

I don't know that.

I'll agree with that.

--
Regards,
Bruce McGee
Glooscap Software
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 2:20 PM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee wrote:
Dan Barclay wrote:

The business case is for Embarcadero

You're probably in a better position to speak about your business than
Embarcaero's.

Yup, and those like me. Not that there are any others. I am not making a business case for Embarcadero, only suggesting that from outward appearances they discount this effect on recurring revenue. To my knowledge there is no data, nor did I say there was any data, outside what they assume for themselves. There is, however, experience of others who have done this. The trouble is, you can also only go by outside appearances of their actions and effects.

how important is "recurring
revenue" to their business, and how long will it take for that to
fall off?

Interesting leap you made there.

I'm not sure it's based in reality, though.

Reality? A business case is based on logic and assumptions, not reality.

The logic is correct on that part of the market, the assumption is only in the magnitude of effect. It is not a leap, nor is it a new concept in the marketplace (any marketplace, but particularly software and developer tools).

I have said nothing about the magnitude of "new blood" developers coming into the fold. They may be counting on that revenue to offset the previously recurring revenue... but they'll have to keep that up and (every year) replace what they lose. It is near certain that a lot of those in that market also intend to create long lived libraries (as opposed to one-off code), else they'd opt for script-kiddy tools. What do they think, when coming onboard, about the inclination to drop support for existing code?

The reality arrives later. By then it is called "history".

I don't know that.

I'll agree with that.

Glad you agree. I'll extrapolate to say that neither of us knows. One of us does have more experience than the other in this part of the space. The only unknown in my mind is the relative magnitudes and whether it matters to EMB.

Dan
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2014 7:23 AM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:

Brandon Staggs wrote:
"Rudy Velthuis" wrote on Mon, 13 Oct 2014 07:26:08 -0700:

Brandon Staggs wrote:

I guess your point is that Delphi should not have anything in
its RTL >> that isn't also found in other language default
libraries?

I am merely saying that it is well possible and no big problem to
do without, like hundreds of thousands of other programmers do.
So anyone claiming that one can't do this or that without
AnsiString is deceiving him- or herself.

Well I must agree with that, as far as it goes. But I don't agree
with the stated reasons for deliberately walling of 8-bit strings
from mobile development -- the code exists and works, and there is
a lot of existing production code that would NOT have to be
re-written and re-debugged if they would simply provide the unit
for it.

Correct. It is not about strings per se. It's about the language
or, more to the point, existing code.

The mobile compilers are different. Such a different compiler was
announced a long time ago, by an article from Nick Hodges when he was
the product manager.

Do not expect them to be 100% backward compatible. Note that the things
that are different should not be a big problem for well written code.

--
Rudy Velthuis http://www.rvelthuis.de

"Usually when people are sad, they don't do anything. They just
cry over their condition. But when they get angry, they bring
about a change."
-- Malcolm X
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2014 1:36 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 14.10.2014 16:23, schrieb Rudy Velthuis (TeamB):


Do not expect them to be 100% backward compatible. Note that the things
that are different should not be a big problem for well written code.

Hello,

obvisiously it's not an issue with the compiler being a different one
but a deliberate decission to not surface them in the mobile RTL.
That's something different, but it's not related to the compiler as such.

Greetings

Markus
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:14 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy wrote:

Except for C++Builder, there is no standard C++ which has AnsiStrings.

Standard C++ has its own std::string class, which is just a container of
'char' elements. Basically a container of 8bit data without any encoding
information at all - similar to AnsiString in pre-2009 versions of C++Builder,
but without COW sematics.

--
Remy Lebeau (TeamB)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:35 AM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges wrote:

Christopher Burke wrote:

I am in fact correct, 120% correct.

I wonder how C# and Java and C++ -- all three of which don't have
ansistring as a type -- manage.

And Objective-C, Swift, etc.

--
Rudy Velthuis http://www.rvelthuis.de

"Correctness is clearly the prime quality. If a system does not
do what it is supposed to do, then everything else about it
matters little." -- Bertrand Meyer
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:35 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Markus Humm <markus dot humm at freenet dot de> wrote in
news:696626 at forums dot embarcadero dot com:


Hello,

sorry, but you're wrong.

Well, stopped reading there as I'm not.

You are very, very, very wrong. Show us your own code for the
challenge, and I'll show you how you can change it to do without
AnsiString.

ISTM that your problem is that you treat your data as text with some
binary inbetween. Just treat it as binary with some text inbetween and
all is well.
--
Rudy Velthuis http://www.rvelthuis.de

"I was under medication when I made the decision to burn the
tapes."
-- Richard Nixon
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:32 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 11.10.2014 04:51, schrieb Christopher Burke:
Remy Lebeau (TeamB) <no dot spam at no dot spam dot com> wrote in
news:696399 at forums dot embarcadero dot com:

Christopher wrote:

Lack of ansi based strings removes the POSSIBILITY of porting
the >>>>> code
No, it does not.
I think you don't understand English. Yes it does is the correct
statement.

No, the lack of AnsiString support DOES NOT remove the possibility
of >> porting your code to mobile.

It does, it has - this is FACT.

Your incorrect opinion does NOT change the facts.

No matter how awesome you are, no matter that you have the TeamB
logo.

If you were GOD - it would not change the facts.

Ansi string removal forced us to abandon mobile development.

Don't be so arrogant as to think you KNOW EVERYTHING about EVERY
PROJECT.

So stop being a bastard, and act like your TeamB tag suggests ok.

Hello,

sorry, but you're wrong. Having no ANsiString support causes the need
for you to rewirte that portion of code. Yes. But it can be rewritten.

Is it as simple as your current AnsiString based version then? I don't
think so. But it can be done, definitively! Show the offending code
and we prove it to you!

(afaik Delphi still is a touring complete language

Indeed. It often makes trips to California and Greece, but also to
Germany and the Netherlands, and some of the Scandinavian countries.

Oh wait, you meant Turing-complete, right? Turing is the name of a guy,
BTW.

--
Rudy Velthuis http://www.rvelthuis.de

Demian's Observation: There is always one item on the screen menu
that is mislabeled and should read "ABANDON HOPE ALL YE WHO ENTER
HERE".
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:05 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy,

| | (afaik Delphi still is a touring complete language
|
| Indeed. It often makes trips to California and Greece, but also to
| Germany and the Netherlands, and some of the Scandinavian countries.

<giggle>

I resisted commenting. ;-)

--

Q

1.19.1.372 (Q's Broken Toolbar.)

Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:49 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 14:32, schrieb Rudy Velthuis (TeamB):


Oh wait, you meant Turing-complete, right? Turing is the name of a guy,
BTW.

Yes, Alan Turing. Ok, I misspelt the name of this fundamental guy who
helped to crack Enigma, found some quite fundamental concepts for our IT
profession, defined the Turing test for artificial intelligence and
later murdered himself.

Now have you anbything else to contribute besides correcting writing
mistakes of others? ;-)

Greetings

Markus
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:28 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher wrote:

No, the lack of AnsiString support DOES NOT remove the possibility of
porting your code to mobile.
It does, it has - this is FACT.

No it is not FACT. If what you said were true, Indy (or any other communication
library, for that matter) would not be possible on mobile. Oh wait, Indy
(and every other communication library) DOES work on mobile! And Indy (and
everything else) deals with 8bit ANSI protocols just fine without needing
ANSISTRING to do it.

Your incorrect opinion does NOT change the facts.

And what facts are those exactly? That you don't understand the difference
between bytes over the wire and a character string in memory, or how to convert
between them when needed? Considering that I am the primary developer of
Indy - a component library that deals primarily with 8bit Internet protocols
- and that it supports mobile development in Delphi and C++Builder (and FreePascal),
my real-world experience does not matter?

Ansi string removal forced us to abandon mobile development.

No, it does not. And if you think it does, try to prove it with a real example.
You won't be able to, because IT IS POSSIBLE to deal with 8bit Ansi data
in mobile WITHOUT using AnsiString. Show an example you think fails, and
I or someone else will show you how to make it work in mobile.

--
Remy Lebeau (TeamB)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:25 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Since a serial port (or a socket) has no concept of text, only
bytes, it could also be thought of as a binary protocol with text
elements. And that is how you should implement it

It is no longer on a serial port, it is on TCP/IP.

Hence the word "socket". Anyway, the source doesn't matter.

--
Rudy Velthuis http://www.rvelthuis.de

"Quotation confesses inferiority." -- Ralph Waldo Emerson
Brian Hamilton ...

Posts: 556
Registered: 10/14/04
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 9:15 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
it can be done alright
even if you have to map each character to its byte equivalent
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 9:35 PM   in response to: Brian Hamilton ... in response to: Brian Hamilton ...
Brian Hamilton <> wrote in news:696420 at forums dot embarcadero dot com:

it can be done alright
even if you have to map each character to its byte equivalent

That is - write an ansi string library of my own, then rewrite dependant
libraries to call my new library etc.... that falls into the realm of
'stupid suggestion' in my book.

The fact remains it requires ansi strings to function, that simple
statement of fact still seems beyond certain <B-Team> members.

The fact that required functionality, that has been there for over 2
decades has been removed for mobile developement sliced the head off our
mobile plans, it is now not possible.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:23 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Brian Hamilton <> wrote in news:696420 at forums dot embarcadero dot com:

it can be done alright
even if you have to map each character to its byte equivalent

That is - write an ansi string library of my own

No, no, no no no no! If you read in or write out a certain encoding
(ASCII, ANSI), either use TStringList with the proper encoding set to
get the text data, since that will do the conversion internally, or
read each line on your own (as BYTES), and then convert using
TEncoding. YOU DON'T HAVE TO WRITE ANY STRING LIBRARY. It is all there
already.

--
Rudy Velthuis http://www.rvelthuis.de

ICTOARTCYAODHTIOTSSIWRTNCAHICGAWI, Acronym: "I Can't Think Of
Anything Reasonable To Counter Your Argument Or Don't Have The
Least Inkling Of The Subject So I Will Resort To Name Calling
And Hope I Can Get Away With It."
-- Ken de Camargo, borland.public.off-topic
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 2:38 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696577
@forums.embarcadero.com:

Christopher Burke wrote:

Brian Hamilton <> wrote in news:696420 at forums dot embarcadero dot com:

it can be done alright
even if you have to map each character to its byte equivalent

That is - write an ansi string library of my own

No, no, no no no no! If you read in or write out a certain encoding
(ASCII, ANSI),

Once more with feeling.

Interfaces -> Ansi Strings -> Proper strings.

There is NO OTHER WAY. This is cold hard actual fact.

How we get the ansi string functionality, that is another issue.

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 3:05 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Once more with feeling.

Interfaces -> Ansi Strings -> Proper strings.


Interfaces -> byte arrays -> proper strings.

This is something you don't seem to get. Byte arrays can easily contain
ANSI-encoded data. YOU DO NOT NEED ANSISTRINGS FOR THAT.
--
Rudy Velthuis http://www.rvelthuis.de

"Living is change; Growth is optional."
-- Juan Wa Chang
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:40 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Brian Hamilton <> wrote in news:696420 at forums dot embarcadero dot com:

it can be done alright
even if you have to map each character to its byte equivalent

That is - write an ansi string library of my own

You go about this the wrong way. First get the text into strings, and
then manipulate the strings. Do not manipulate the text as 8-bit
binary. Extract it from the binary data and convert it to string.

No need for an "Ansi string library" of your own.

--
Rudy Velthuis http://www.rvelthuis.de

"Stories of imagination tend to upset those without one."
-- Terry Pratchett
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 1:08 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Note that Mobile makes two changes to strings, zerobased strings and
removal of ansi strings.

Note also the difference - zero based strings is a pain in the butt,
requires me to rewrite half my code base, however IT IS POSSIBLE TO
DO.

HALF of your code cares about whether your strings start at 0 or 1?

That sounds like an overstatement.

--
Regards,
Bruce McGee
Glooscap Software
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 2:18 PM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee <bmcgee at glooscap dot com> wrote in news:696371
@forums.embarcadero.com:

Christopher Burke wrote:

Note that Mobile makes two changes to strings, zerobased strings and
removal of ansi strings.

Note also the difference - zero based strings is a pain in the butt,
requires me to rewrite half my code base, however IT IS POSSIBLE TO
DO.

HALF of your code cares about whether your strings start at 0 or 1?

No - half my code DEPENDS on whether my strings start at 0 or 1, meaning
half my code has to be retested and possibly rewritten, redesigned for zero
based strings.

That sounds like an overstatement.

Every copy/pos and S[x] construct ... that's a lot of places things can be
tied into the change.

However - it is certainly achievable.
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 2:28 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Bruce McGee <bmcgee at glooscap dot com> wrote in news:696371
@forums.embarcadero.com:

Christopher Burke wrote:

Note that Mobile makes two changes to strings, zerobased strings
and >> removal of ansi strings.

Note also the difference - zero based strings is a pain in the
butt, >> requires me to rewrite half my code base, however IT IS
POSSIBLE TO >> DO.

HALF of your code cares about whether your strings start at 0 or 1?

No - half my code DEPENDS on whether my strings start at 0 or 1,
meaning half my code has to be retested and possibly rewritten,
redesigned for zero based strings.

That sounds like an overstatement.

Every copy/pos and S[x] construct ... that's a lot of places things
can be tied into the change.

However - it is certainly achievable.

That sounds like another 2% problem, not a 50% one.

--
Regards,
Bruce McGee
Glooscap Software
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 7:49 PM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee <bmcgee at glooscap dot com> wrote in news:696396
@forums.embarcadero.com:

However - it is certainly achievable.

That sounds like another 2% problem, not a 50% one.

Well, if you look at it in terms of lines of code - then obviously. It was
pretty clear when I said 50% and 2% I was refering to areas of dependency.

If we use your definition, the answer is probably 2% for zero based arrays,
and I can probably cound around 60 lines dependent on ansi strings.
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2014 10:48 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Bruce McGee <bmcgee at glooscap dot com> wrote in news:696396
@forums.embarcadero.com:

However - it is certainly achievable.

That sounds like another 2% problem, not a 50% one.

Well, if you look at it in terms of lines of code - then obviously.
It was pretty clear when I said 50% and 2% I was refering to areas of
dependency.

If we use your definition, the answer is probably 2% for zero based
arrays, and I can probably cound around 60 lines dependent on ansi
strings.

I hope 60 lines is a lot less than 2%.

Regardless, this is much more reasonable.

--
Regards,
Bruce McGee
Glooscap Software
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2014 10:09 AM   in response to: Bruce McGee in response to: Bruce McGee
Bruce McGee <bmcgee at glooscap dot com> wrote in news:696425
@forums.embarcadero.com:

I hope 60 lines is a lot less than 2%.

Yes, I converted the affected by (50%/2%) down to actual lines of code
(2%/60 lines).

Regardless, this is much more reasonable.

And less practical.

Also - note the huge chunk of zero based array stuff is not where the
problem, it is the 60 or so lines of code that I can't "un-ansi" is where
the issue is.

You see - this software was designed and built post UNICODE (i.e. not
converted from ansi), so I only used ansi where required, and no more.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 5:23 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

The protocol is defined by the vendor, I implement the protocol.

The protocol is a text based protocol, with binary elements in it.

So are many protocols. Many programmers all around the world who don't
have AnsiStrings - because they program in a different language - have
no problem handling such data using byte arrays and (usually 16-bit)
strings. So why is it so hard for you?

--
Rudy Velthuis http://www.rvelthuis.de

Bove's Theorem: The remaining work to finish in order to reach
your goal increases as the deadline approaches.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:37 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

Christopher wrote:

Most of them, because they implement serial protocols over TCP/IP or
require serial handshaking - they frequently put things like
ACK/NAK/SOH/SOT characters in the middle of the string of text that
comes back, They frequetly store length bytes/words midd string as
well.

Such protocols are binary and should be handled using byte buffers
instead of string buffers.

Exactly.

Not the text files, and btw - the ANSI text files have been a
problem (i.e. XE6 TSTringlist couldn't handle saving them correctly
for the other systems to read).

TStringList has public Encoding and DefaultEncoding properties, and
TStringList.SaveTo...() has an optional Encoding parameter. If you
don't specify an encoding to save as, TStringList.Encoding is used if
it is not nil (such as if TStringList.LoadFrom...() was previously
called), otherwise TStringList.DefaultEncoding is used instead (it is
set to TEncoding.Default by default). It is your responsibility to
specify a proper Encoding for TStringList to save its content as.

Indeed.

--
Rudy Velthuis http://www.rvelthuis.de

"Americans used to roar like lions for liberty; now we bleat
like sheep for security."
-- Norman Vincent Peale
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2014 1:56 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Until then - I need the ability to perform dispicable acts just to
write my software.

You have the ability. Even without 8-bit string support, it is not too
hard to do it. But note that one day, this may go totally wrong (and
then you'll notice), or it will slowly go wrong each time a little bit
more, and then you risk not even noticing it, which is, IMO, far worse.

FWIW, "Trying to outsmart a compiler defeats much of the purpose of
using one." — Kernighan and Plauger, The Elements of Programming Style.

--
Rudy Velthuis http://www.rvelthuis.de

"You'll never have a quiet world till you knock the patriotism
out of the human race."
-- George Bernard Shaw
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 9:41 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694727
@forums.embarcadero.com:

Christopher Burke wrote:

Until then - I need the ability to perform dispicable acts just to
write my software.

You have the ability.

Indeed, in XE7 ...

FWIW, "Trying to outsmart a compiler defeats much of the purpose of
using one." â€" Kernighan and Plauger, The Elements of Programming Style.

Which basically means, I can't do mobile because Embarcadero decided I
can't.

I'm 150% dependent on Ansistrings as it stands, and will be for probably
the next 5- 10 years at least.

I mean our industry is even the only one supported by Microsoft for Windows
XP through to 2019, because it lags behind so much.

Many of the interfaces are to government regulated systems (such as
gambling systems) meaning change is slower than snails pace in them.

So no - I'm not going to just tell the customers to go home as you suggest
- I'll just use remote desktop on iPad etc to get portable functionality.

Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2014 9:47 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694727
@forums.embarcadero.com:

Christopher Burke wrote:

Until then - I need the ability to perform dispicable acts just to
write my software.

You have the ability.

Indeed, in XE7 ...

FWIW, "Trying to outsmart a compiler defeats much of the purpose of
using one." â€" Kernighan and Plauger, The Elements of Programming Style.

Which basically means, I can't do mobile because Embarcadero decided I
can't.

I'm 150% dependent on Ansistrings as it stands, and will be for probably
the next 5- 10 years at least.

I mean our industry is even the only one supported by Microsoft for Windows
XP through to 2019, because it lags behind so much.

Many of the interfaces are to government regulated systems (such as
gambling systems) meaning change is slower than snails pace in them.

So no - I'm not going to just tell the customers to go home as you suggest
- I'll just use remote desktop on iPad etc to get portable functionality.


You could also use Windows based tablets for portability.

--
Dalija Prasnikar
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 7:33 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar <> wrote in news:694890 at forums dot embarcadero dot com:

You could also use Windows based tablets for portability.

Yet to find 5 and 7 inch WIndows tablets that Delphi can compile for...
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 12:01 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:
Dalija Prasnikar <> wrote in news:694890 at forums dot embarcadero dot com:

You could also use Windows based tablets for portability.

Yet to find 5 and 7 inch WIndows tablets that Delphi can compile for...

That is a bummer...

Maybe you could try using Andreas Hausladen hack for 8-bit strings on
mobile http://andy.jgknet.de/blog/2014/09/system-bytestrings-support-for-xe7/

--
Dalija Prasnikar
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 2:14 PM   in response to: Christopher Burke in response to: Christopher Burke
Am 05.10.2014 16:33, schrieb Christopher Burke:
Dalija Prasnikar <> wrote in news:694890 at forums dot embarcadero dot com:

You could also use Windows based tablets for portability.

Yet to find 5 and 7 inch WIndows tablets that Delphi can compile for...

Hello,

would a 8 inch tablet do?
In my drawer is some Acer tablet with Windows 8, a dual core atom CPU
(up to 1,8 GHz) which runs my Delphi apps just fine (disregarding that
most of them aren't yet optimized for touch).

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:40 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:694727
@forums.embarcadero.com:

Christopher Burke wrote:

Until then - I need the ability to perform dispicable acts just to
write my software.

You have the ability.

Indeed, in XE7 ...

You had the ability in Delphi 4 (yes, not Delphi XE4, I mean Delphi 4).

--
Rudy Velthuis http://www.rvelthuis.de

"Try not to become a man of success but rather to become a man
of value."
-- Albert Einstein
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 5, 2014 11:43 PM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

So no - I'm not going to just tell the customers to go home as you
suggest

Strawman. I never suggested that. I didn't say you should stop writing
software, or that your customers should stop using software. I said I
would get rid of libraries that treat binary data as strings, because
that is a terrible code smell. I never said I would not try to find
better alternatives.

--
Rudy Velthuis http://www.rvelthuis.de

"If a patient cannot clean his teeth, no dentist can clean them
for him." -- Martin H. Fischer
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 2:35 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:695235
@forums.embarcadero.com:

Christopher Burke wrote:

So no - I'm not going to just tell the customers to go home as you
suggest

Strawman.

Pretty much what I think of your argument.

You tell me I don't need Ansistrings, because I can go and write them
myself.

You really don't know what is involved in interfacing with government
regulated systems.

Stick to what you know - trolling on this forum, I'll stick to what I know
- trying to provide solutions for some very bizarre systems.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 6:04 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:695235
@forums.embarcadero.com:

Christopher Burke wrote:

So no - I'm not going to just tell the customers to go home as you
suggest

Strawman.

Pretty much what I think of your argument.

Sorry, but that's bullshit. Yours is a strawman, because you rant about
something I never said. You did say what you said, so it may be
something you don't like, but it is certainly not a strawman.
--
Rudy Velthuis http://www.rvelthuis.de

"When you start off by telling those who disagree with you that
they are not merely in error but in sin, how much of a dialogue
do you expect ?"" -- Thomas Sowell
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 6:18 AM   in response to: Christopher Burke in response to: Christopher Burke
Christopher Burke wrote:

Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:695235
@forums.embarcadero.com:

Christopher Burke wrote:

So no - I'm not going to just tell the customers to go home as you
suggest

Strawman.

Pretty much what I think of your argument.

You tell me I don't need Ansistrings, because I can go and write them
myself.

I said it is not wise to use AnsiStrings FOR BINARY DATA. If that is
what you "need" them for, then something is wrong. For binary data, use
a byte array.

And to those who keep on lamenting "but there are no manipulation
routines for byte arrays equivalent to the ones for strings", I say:
"So what? You are programmers, dammit. Write your own. It is not rocket
science, and writing code to make your things work - properly and
maintainably - is your job".

Did that clarify what I wrote?
--
Rudy Velthuis http://www.rvelthuis.de

"Giving birth is like taking your lower lip and forcing it over
your head." - Carol Burnett.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2014 10:21 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

And to those who keep on lamenting "but there are no manipulation
routines for byte arrays equivalent to the ones for strings", I say:
"So what? You are programmers, dammit. Write your own. It is not
rocket science, and writing code to make your things work - properly
and maintainably - is your job".

Oh, what a silly argument! By that argument, all Embarcadero need
offer is a compiler!

VCL? "Write your own!"
Maths functions? "Write your own!"
Streaming? "Write your own!"

--
SteveT

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 12:08 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

And to those who keep on lamenting "but there are no manipulation
routines for byte arrays equivalent to the ones for strings", I say:
"So what? You are programmers, dammit. Write your own. It is not
rocket science, and writing code to make your things work - properly
and maintainably - is your job".

Oh, what a silly argument! By that argument, all Embarcadero need
offer is a compiler!

VCL? "Write your own!"
Maths functions? "Write your own!"
Streaming? "Write your own!"

Your reply is silly, not my argument.

Delphi comes with a number of extensive libraries, but it can not
supply everything. It is the job of a programmer to either write the
functionality that is not provided by the standard libraries, or to
find a third party library that can do that.

In this case, it is pretty easy to write and test code that can perform
the "missing" functionality for byte arrays.

So, instead of complaining over and over again about the lack of a
number of functions, it is much better to simply write them. Writing
code that makes the project work is their job after all, isn't it?

--
Rudy Velthuis http://www.rvelthuis.de

"After I'm dead I'd rather have people ask why I have no monument
than why I have one."
-- Cato the Elder (234-149 BC, AKA Marcus Porcius Cato)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2014 10:58 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 07.10.2014 21:08, schrieb Rudy Velthuis (TeamB):
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

And to those who keep on lamenting "but there are no manipulation
routines for byte arrays equivalent to the ones for strings", I say:
"So what? You are programmers, dammit. Write your own. It is not
rocket science, and writing code to make your things work - properly
and maintainably - is your job".

Oh, what a silly argument! By that argument, all Embarcadero need
offer is a compiler!

VCL? "Write your own!"
Maths functions? "Write your own!"
Streaming? "Write your own!"

Your reply is silly, not my argument.

Delphi comes with a number of extensive libraries, but it can not
supply everything. It is the job of a programmer to either write the
functionality that is not provided by the standard libraries, or to
find a third party library that can do that.

In this case, it is pretty easy to write and test code that can perform
the "missing" functionality for byte arrays.

So, instead of complaining over and over again about the lack of a
number of functions, it is much better to simply write them. Writing
code that makes the project work is their job after all, isn't it?

Hm? Since those functions were converted to pure pascal some time ago
and can be activated by a hack anyway I see no really good reason (the
reason with "it confuses newbies" doesn't really count as it would
rather come down to "you haven't educated them properly") to write some
replacement for things which were already there.

Would that have been new functionality I'd accept that I might have to
write it on my own first. I'm simply not convinced that the pros (if
there exist some besides having the unit tests running one minute less)
outweight the complains and cons.

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2014 11:23 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Hm? Since those functions were converted to pure pascal some time ago
and can be activated by a hack anyway I see no really good reason (the
reason with "it confuses newbies" doesn't really count as it would
rather come down to "you haven't educated them properly") to write
some replacement for things which were already there.

They were never "there". It is internal code, simply not changed yet to
do without AnsiChar and AnsiString. They want to get rid of such code.

--
Rudy Velthuis http://www.rvelthuis.de

"To travel is to discover that everyone is wrong about other
countries."
-- Aldous Huxley
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2014 8:45 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 09.10.2014 08:23, schrieb Rudy Velthuis (TeamB):
Markus Humm wrote:

Hm? Since those functions were converted to pure pascal some time ago
and can be activated by a hack anyway I see no really good reason (the
reason with "it confuses newbies" doesn't really count as it would
rather come down to "you haven't educated them properly") to write
some replacement for things which were already there.

They were never "there". It is internal code, simply not changed yet to
do without AnsiChar and AnsiString. They want to get rid of such code.

Hello,

if something can be surfaced with a hack it is there, otherwise there's
nothing for the hack to surface!

And this doesn't depend on the reasons why it was not surfaced in the
first place! ;-)

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 3:29 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

if something can be surfaced with a hack it is there, otherwise
there's nothing for the hack to surface!

It is not officially there. It is undocumented. It is not supported.
So, for all practical purposes, it is not there. That they may be used
internally, simply because they did not remove all AnsiString code from
their code base yeet does not mean they are "there".

It is a bit like strict private members. They exist, but are not
accessible from any other class, so for all practical purposes, they
are not there, even if you could access them with a hack. So if someone
says "class Derived does not have members X and Y", even if they are
there in the ancestor as stric private members, that person is right.

--
Rudy Velthuis http://www.rvelthuis.de

"When I was a kid I used to pray every night for a new bicycle.
Then I realised that the Lord doesn't work that way so I stole
one and asked Him to forgive me." -- Emo Philips.
Christopher Burke

Posts: 580
Registered: 9/25/99
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 12:15 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) <newsgroups at rvelthuis dot de> wrote in news:696752
@forums.embarcadero.com:

Markus Humm wrote:

if something can be surfaced with a hack it is there, otherwise
there's nothing for the hack to surface!

It is not officially there. It is undocumented. It is not supported.
So, for all practical purposes, it is not there.

Finally - a statement I can agree with.

I also understand one just can't let code into the mobile compiler, it is
extra work to move and test every last bit of RTL into the mobile compiler.

I think that there were certain technical limitations imposed on
Embarcadero meaning they just couldn't do certain things, and that there
was no evil intent.

However - just as there are technical constraints imposed on Embarcadero
that disallowed Ansistrings in the mobile compiler, you have to realise
that customers have technical constraints that require them.

You can't defend Embarcadero for its constraints, whilst simultaneously
ignoring constraints that customers have.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Does XE7 have support for older style strings? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2014 1:54 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Am 13.10.2014 12:29, schrieb Rudy Velthuis (TeamB):
Markus Humm wrote:

if something can be surfaced with a hack it is there, otherwise
there's nothing for the hack to surface!

It is not officially there. It is undocumented. It is not sup