How display the contents of text file
Klaus Major
klaus at major-k.de
Thu Aug 9 10:14:23 EDT 2007
Hi Kavitha,
> Hi,
>
> I am a newbie, can anyone please tell me how to display the
> contents of file without any special characters. I tried and the
> result has lots of special characters that are not in the file. I
> am working on Mac, in windows it works fine.
welcome to the wonderful and exciting world of crossplatform software
development :-D
As you already experienced, Windows uses a different text encoding
than the mac does.
So if you want to display a text file created on windows, you have to
convert it to mac encoding
using the "isotomac" function like this:
...
put url("file:the_windows_text_file.txt") into win_text
put isotomac(win_text) into mac_text
put mac_text into fld "Field for Mac display"
...
Or in a hard to read one-liner:
...
put isotomac(url("file:the_windows_text_file.txt")) into fld "Field
for Mac display"
...
;-)
Hope that helps.
> Thank youKavitha
Regards from germany
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list