A bit RTF-ed off.

richmond richmondmathewson at gmail.com
Sat Jul 9 04:13:47 EDT 2016


I was using 7.1.4 because I was attempting to set up an exercise for my 
progging pupils;
and for various pretty obvious reasons we are working with 7.1.4 at the 
moment.

I must find a 100% reliable RTF pumper-outer for Linux.

Richmond.

On 07/09/2016 06:13 AM, Kay C Lan wrote:
> As I assume you are now using LC8 Indy (to that generous person, God
> bless you and your family) I'll point out two entries in the LC8
> Dictionary which I know you're having trouble accessing:
>
> Under 'textDecode':
>
> It is highly recommended that any time you interface with things
> outside LiveCode (files, network sockets, processes, etc) that you
> explicitly textEncode any text you send outside LiveCode and
> textDecode all text received into LiveCode. If this doesn't happen, a
> platform-dependent encoding will be used (which normally does not
> support Unicode text).
>
> It is not, in general, possible to reliably auto-detect text encodings
> so please check the documentation for the programme you are
> communicating with to find out what it expects. If in doubt, try
> UTF-8.
>
> Under 'RTFText':
>
> Note: Unfortunately, OpenOffice does not have particularly good rtf
> import / export capabilities (it doesn't even round-trip correctly
> through itself!) and thus copying / pasting of lists between LiveCode
> and OpenOffice will not work reliably or correctly.
>
> Important: Because the RTF standard does not include the box,
> threeDbox, and link styles supported by LiveCode, the RTFText property
> does not necessarily include all information necessary to reproduce
> the style information in a chunk. To export and re-import field
> information without losing any style information, use the
> htmlTextproperty instead.
>
> So I think your script should look something like:
>
> set the RTFText of fld "myRTF" to textDecode(myFile,"CP1252")
>
> Obviously CP1252, could be UTF-16BE, UTF-8, ASCII or any of the other
> recognised formats like "ISO-8859-1" which I see is a Linux only
> format.
>
> HTH
>
> _______________________________________________
> 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