strange char translation from intel to ppc
Brian Yennie
briany at qldlearning.com
Thu Oct 9 05:03:17 EDT 2008
Bernard,
If your theory holds true (and it sounds plausible - that custom
property names are subject to translation but not the property
contents), one possible workaround would be to base64Encode() your
array keys.
It's not terribly elegant, but any base64 encoded key value should
survive the translation and then you can decode it again yourself.
Something like:
## encode myArray into encodedArray
repeat for each line tKey in keys(myArray)
put myArray[tKey] into encodedArray[base64Encode(tKey)]
end repeat
..
## decode encodedArray into myArray
repeat for each line tKey in keys(encodedArray)
put encodedArray[tKey] into myArray[base64Decode(tKey)]
end repeat
NOTE: base64Encode will increase the size of your keys, as it will for
example need 4 bytes to encode 3 bytes. Hopefully you don't have huge
keys where this would be a big issue.
> Bonjour Eric,
>
> I think the problem may be that I'm using these characters within
> the keys
> of an array, then storing the array as a custompropertyset. Whilst
> these
> characters are not strictly alphanumeric, since they are ascii, I
> didn't
> think there would be a problem. But perhaps because they are not the
> content of the array, there is still an isoToMac conversion going
> on. And
> since their numerical value is below 128, I think maybe they are being
> mis-translated as per the bug I referenced.
>
> For about 15 years of my life there was a very good chance that
> whenever I
> drove a car it would stop working. Friends and family used to take
> me along
> when they were buying a car, and if it didn't break down whilst I
> did the
> test drive they would buy it. Then I seemed to lose this 'gift',
> and in the
> last 10 years I never had a car break down on me.
>
> I'm starting to think the planets have re-aligned themselves, and my
> 'gift'
> has returned. In the absence of a car, my 'gift' has found a new
> target.
>
> Bernard
More information about the use-livecode
mailing list