Jump to content

calculation html entities translation


harryk
 Share

This topic is 6546 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello, long time no see. I used to post often, long time ago.

I don't use Filemaker online, just as an interface to help me publish things online. It's something like this, I've got on a site a list of teachers. When people apply for the list, they use a form. This form generates with javascript the complete html code of all the infomation they fill in, I get the html-code via a field in the form. There's even a preview function so they can see how their application will look like on the web.

Recently I use Filemaker to organize those chunks of html, to compose once a month the complete html-file.

My problem is the representation of non-ascii html signs, normally represented by html-entities like á that sort of thing.

Filemaker will be able to help me, by finding and replacing the signs that need html-entities.

My question is, does anyone know whether FM calculations exist that do that job for me, so I do not have to invent the wheel again?

Harry

Link to comment
Share on other sites

Web Companion has External(WebToHTML,fieldname).

However, this generates entities like  instead of Ä.

I simply use XSLT and declare the character set in the resulting HTML to avoid the issue completely.

However, Netscape 3.x users will have a problem here.

Link to comment
Share on other sites

I think the answer (at least in my setup, other options in other directions as you mention are possible too) lies in a calculation with a nested substitute function that replaces all the special signs in the html-entities.

I found something on the internet like below.

Does anyone know whether there is a limit to the number of nestings you can use in a substitute function?

Harry

(see below)

Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( field to substitute,"?","Ä"), "?", "Å"), "

Link to comment
Share on other sites

Harry,

Look at using the full [FMP-Field] tag structure. From the CDML database:

Syntax

[FMP-Field: Field name , Encoding ]

Parameter(s)

First parameter: The name of the field

Second parameter (optional)??? Encoding. Use one of the following reserved words:

Raw - Don't perform any encoding

URL - Perform URL encoding

HTML - (default) Perform HTML encoding

Break - Perform HTML encoding and replace soft returns with <br>

Hope this is of interest. All the best.

Garry

Link to comment
Share on other sites

This topic is 6546 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.