Strip a ™ character
Richard Gaskin
ambassador at fourthworld.com
Thu Oct 2 11:34:59 EDT 2014
JB wrote:
> The code I presented was because I thought it would
> be similar to what you already have. It shows there is
> not much code for that routine.
Seems like we're on the same page then.
I've missed the first several posts in this thread, so I must admit that
I don't have a good understanding of the full scope of the problem, but
I do maintain the belief that because LC has pretty similar code to do
that sort of replacement, I suspect what's needed here could be done
with LC right now.
If the problem is that the source text is Unicode, a simple binary
replace may not suffice, since it can be difficult to know the
boundaries between glyphs.
For example, if you were replacing "AA" with "BB", if your source had:
BB BA AB AA
...then you'd wind up with:
BB BB BB AA
If this is Unicode we're dealing with, you may find LiveCode 7 can
handle this quite well using the built-in replace command, as it
understands glyph boundaries well.
But even in LiveCode 6.x, I'll bet there's a way to solve with what we
have right now, though it may be slower.
> If I was going to suggest code to replace the code that is being
> used I would strongly suggest Grand Central Dispatch (GCD).
LC now includes enhanced parallelism, though mostly for graphics at this
time. It may even be that the Mac build uses GCD to help with that
(being Apache licensed it's compatible with the GPL that governs the
Community Edition).
But how would parallelism benefit a binary replacement? Is the data set
unusually large?
I would expect/hope that the new multi-core optimizations in LC could
one day be extended with an exposed API for scripting. Perhaps this may
be a good test case for exploring those ideas.
> So I have been attacked at many levels for many years and when
> I expose a serious problem with code in LiveCode and someone
> taunts me or LiveCode I do not find it any more fun than someone
> kicking me after others have attacked me from behind. That is the
> same attitude people gave me when they would steal my supplies
> and tools from my electrical contracting business and intentionally
> over charge me constantly. I wrote a program to catch the over
> charging but even that takes time out of your life and they know
> what they are doing and they enjoyed it. You learn to deal with it
> or you break and they are not held accountable because they will
> say it was a mistake. Things are a lot worse than you are aware
> of in the business world unless you are connected to this group.
I'm sorry to hear that you've had such experience with your business,
but please let me assure you no one here means to do you any harm.
On the contrary, Dr. Hawkins was merely poking fun at C rather than you,
and my only interest here is in helping you get what you want from LiveCode.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list