What I really need to do is grab a field with some text in French (i.e. with accented characters) then translate it into peoper HTML code and copy it back into to another field from where it is used to generate a page that is uploaded in a web site.
I used to do it with diStyler, but this programs crashes all the time now that we have moved to Mac OS X and the company who created this useful utility seems to have abandoned it.
Since it is not uncommon that data kept in FileMaker ends up in a web site, I find it strange that there is so few resources to format the data properly before uploading it.
How do you deal with that issue?
Serge Grenier
Thank you for your suggestion.
I have downloaded and installed the package, but couldn’t make it work yet. So I would appreciate your help once again. I have tried the following code:
set aText to {cell “Text” of current record of window “Catalog”}
tell application “TextCommands”
global aText
encode HTML aText
end tell
set {cell “HTML” of current record of window “Catalog”} to aText
but the text is copied unchanged into the HTML field.
The documentation doesn’t tell how to retrieve the converted HTML string.
Thank you for your help!
Serge Grenier
Did you try assigning the converted text to a new variable?
Looking at your code, you’re just putting back in the same text you pulled out.
-N
I have changed it to:
set aText to {cell “Text” of current record of window “Catalog”}
tell application “TextCommands”
global aText
set aText to encode HTML aText
end tell
set {cell “HTML” of current record of window “Catalog”} to aText
But now it only puts the first characted of the variable aText into the field “HTML”.
If this first character is an "Ã " for instance, it will put an ‘&’
suggesting that TextCommands did the translation to ‘à ;’
Somehow, the variable aText goes from a string to a one character list.
Serge Grenier