Strip a ™ character
Mark Wieder
mwieder at ahsoftware.net
Thu Oct 2 19:13:14 EDT 2014
JB <sundown at ...> writes:
>
> It looks to me the code is good. I guess
> someone decided they could Trade Mark ™
> Binary to Hex.
>
> In Hex it shows up as either a A or AA. You
> would think it would always be AA since that
> is the Hex value for ™.
You haven't given a lot of information here, but my guess is that you're
stuck with Windows text files. Windows uses a crlf pair for line endings.
When you remove the cr part (relace return with empty) you're still left
with the line feed char, which is a hex 0x0A. To get rid of both carriage
returns and linefeeds in your data stream,
replace return with empty in theData
replace numtochar(0x0A) with empty in theData
then do your baseConvert magic.
Although if you're dealing with one binary string in a line I think you'd be
better off just converting a line at a time to start with.
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list