Char Set on Custom Properties
J. Landman Gay
jacque at hyperactivesw.com
Thu Sep 3 15:38:06 EDT 2015
Returning to this topic...we are in the process of creating new stacks
in LC 7 while still running older LC 6 stacks with the same app. Stacks
have custom properties containing text created on a Mac, and my app uses
MacToISO() to display the text when running on Windows.
Some of the LC 6 stacks will be edited and saved in LC 7, others will
remain as LC 6 for a while. My app needs to know whether the character
set has already been converted so it can display text correctly. Is
there a way to tell in a script?
On 7/23/2015 7:38 AM, Mark Waddingham wrote:
> LC 7 knows the difference between binary and text - this is retained
> when saving custom props (if you save in 7+ format).
>
> The only rub is that for existing stacks in the old format custom
> props will be taken to be binary data (which auto converts to text
> assuming the native encoding). Thus you will need to still do the
> charset translation there for the props that are text. If you then
> textdecode that and set the property to the result and save in lc7
> format then it will then be treated as text in future (so no charset
> translation is required in future).
>
> Sent from my iPhone
>
>> On 22 Jul 2015, at 22:06, Dan Friedman <dan at clearvisiontech.com>
>> wrote:
>>
>> Hello! Way back in LiveCode 5 and 6, custom properties were not
>> ported to the proper character set when you opened the stack on a
>> different platform (Mac --> Win or Win --> Mac). This was easily
>> solved by a simple macToISO() or ISOtoMac(). However, it appears
>> that LC 7.x is now doing this char mapping for custom properties on
>> it's own. Before I modify a mountain of code, can anyone confirm
>> that LC 7+ automatically maps custom properties to the proper char
>> set for the host platform?
>>
>> Thanks! Dan _______________________________________________
>> 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
>
> _______________________________________________ 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
>
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list