Jump to content

forms and apostrophe's


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

Recommended Posts

I am trying to get a form to search the FM database and having trouble remember what to do about apostrophe's.

Whenever we search on a word like: l'étude I get no results using the PHP form.

On the list.php page I see the form is adding '' so when I print_r($_REQUEST) I see: l'étude

ok fine - so I then use stripslashes to get it back to l'étude and put to a FMFind() on the new data and....

no results

However when searching for the same string in filemaker we get the results.

What do I need to do? I have a feeling it is something to do with Filemaker 6 and the encoding (UTF-8) vs Latin, but what can I do?

Thoughts please...

Link to comment
Share on other sites

I have made some progress, but think there is a way to do this without need the following 'gymnastics'.

$badcharacters = array("'", "é");

$var = str_replace($badcharacters, "@", $var);

This used the filemaker wildcard '@' and found the data I was looking for.

Keep your ideas coming though if you have a better way.

Thanks

Link to comment
Share on other sites

Not sure if anyone is still using this form but here is an update:

The stripslash() and strreplace() to get the bad characters to '@' wildcard symbols seems to be the best options.

I did some checking on the UTF-8 vs ISO-8559-1 encoding of the pages and they do handle the forms different.

UTF-8 takes the eacute (é) and turns it to: %C3%A9

ISO-8559-1 makes é = E9

interesting to see the html entities, but to nail this down and cover all holes may require some extra massaging of the data before it is sent to filemaker...

Link to comment
Share on other sites

This topic is 6456 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
×
×
  • Create New...

Important Information

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