Displaying Windows-1252 encoded URL in field

Martin Baxter mb.ur at harbourhosting.co.uk
Wed Aug 23 11:46:37 EDT 2006


Laurent Ostiz wrote:
> Hi !
> 
> I download XML files from the Internet that are windows-1252 encoded. I 
> do not see how to specify for a field that the text is encoded this way 
> so that it displays correctly.
> Certainly a newby question.
> 
> Thanks for your answer.
> 
> Laurent

Hi Laurent.

If you want to display the readable text from these files in a Rev field 
on a Mac (which I'm guessing is what you're doing), you can translate it 
to Mac Roman using the isotoMac() function.

Despite this function's name (and despite what it says in the 
dictionary), this built-in function converts from ansi (a.k.a. 
Windows-1252) to Mac roman.

There is a nearly-symmetrical function MacToIso() for converting back again.

Be careful to only use these to convert user-readable text as it can 
mess up certain of the low-ascii control characters that are sometimes 
used as delimiters in data. You shouldn't find any of those in XML though.

Martin Baxter





More information about the use-livecode mailing list