Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Avoid special chars (now i need help)

Featured Replies

So i thougth i solved my problem, guess i did not.

This is the situation.

One of my fields in a database contains special characters, circumflex, grave accent, etc).

I read this variables:

var1="[FMP-Field: textfield,Break]"

When i display var1 in my browser :

window.document.myform1.tekstveld1.value=var1

the text is scrambled. for example i see codes like this : &#235

I have been playing with the field encoding and with escape/unescape function.

How should i proceed now?

For example i can change all the special characters in the filemaker field with their code, but what code?

Any help is welcome

Jitse

Have you tried the various ways of showing a field:

var1="[FMP-Field: textfield,raw]"

var1="[FMP-Field: textfield,format]"

Good Luck.

Garry

  • Author

Thanks gary,

indeed i tried that combination.

Now i have made my own javascript encode function.

This is a sample that only changes the dieresus (umlaut mark).

Offcourse this code can be used for all ASCII characters.

Jitse

function encodestrings(encodestr){

var locstr

locstr=encodestr

while(locstr.search("ë")!=-1){

locstr=locstr.replace("ë",String.fromCharCode(235))

}

return locstr

}

  • Author

Now this is the complete function (that i think does the job)

function encodestrings(encodestr){

var locstr

var codestr

var code

var i =0

var k =0

locstr=encodestr

while (i !=-1) {

i = encodestr.indexOf("&#",i)

k = encodestr.indexOf(";",i)

if (i!=-1){

codestr=encodestr.substr(i+2,k-i-2)

encodestr=encodestr.replace("&#"+codestr+";",String.fromCharCode(codestr))

i=i+1

}

}

while(encodestr.search("<br>")!=-1){

encodestr=encodestr.replace("<br>","n")

}

return encodestr

}

Jitse

Have you tried something like this:

document.write(unescape("[FMP-Field:textfield]");

Good Luck.

Garry

  • Author

Thanks Gary,

Indeed i have tried unescape, to no avail.

until now the javascript works good.

Greetings

Jitse

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.