HTML entities

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
exheusden
Posts: 170
Joined: Fri Oct 09, 2009 5:03 pm
Location: Belgium
Contact:

HTML entities

Post by exheusden » Thu Oct 15, 2009 1:24 pm

In HC and SuperCard I wrote a shared script to change accented characters and other special characters in text holders to HTML entities. I could reuse the script (more or less) in Revolution, but I was wondering if there was already a means of doing this. I know the HTMLtext property includes HTML entities capabilities, but I fear that the other aspects of the property will be excessive.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9867
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Post by FourthWorld » Thu Oct 15, 2009 4:22 pm

It's hard to say which would be better without seeing your script, but htmlText is pretty nifty. You can parse out what you don't need, and you get all the ISO-8959-1 character entities for free.

Alternatively you could consider putting a lookup table into an array, which would give you pretty fast performance while leaving you in control of the details of what you do with those entities.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”