Re: Strip a ™ character

JB sundown at pacifier.com
Thu Oct 2 19:14:30 EDT 2014


I am using a Mac the text is straight from a field.
The text works fine with the other conversions.

John Balgenorth


On Oct 2, 2014, at 4:13 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> 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
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list