[FX.php List] MacRoman extended characters

Dennis Crall dennis-crall at uiowa.edu
Mon Oct 10 11:17:08 MDT 2005


Marisa,

My situation involved a search and foreign language characters, so you may
have to experiment a bit. But here is what I did:

$fx->AddDBParam( $key, utf8_encode( $value ), "eq" );

utf8_encode() translates $value into a unicode string, which is how
FileMaker wants to store the data. So I would make sure that any data you
post through the form is encoded as UTF8. I don't believe you need to decode
data coming back from the database.

This method assumes utf8_encode() knows how to translate MacRoman strings,
which I'm not sure about.

Best of luck,

Denny



On 10/10/05 11:56 AM, "Marisa Smith" <marisa at datasmithconsulting.net> wrote:

> Dennis - would you mind giving more details about how you did this?  I just
> spent 2 hours working on the exact same problem as Kevin and have yet to
> figure it out.  I tried changing the character set to UTF-8 on the page,
> which helped - the data is now written back to the database, whereas before
> none of the data in the form would get written back.
> 
> Now, if I display the data stored in the field it works fine --EXCEPT if I
> try to display it in a textarea form field.  In this case, it displays
> &#8217; in the form field among the rest of the field contents, and if I
> then submit the form again, and look in the database, the &#8217; is stored
> in the field instead of the curly apostrophe.
> 
> Are you encoding/decoding the data before you POST it back to the database?
> If so, would you mind posting a snippet of your code?  I must be missing
> something simple.
> 
> Thanks!
> Marisa
> 
> 
> 
> On 10/10/2005 12:07 PM, "Dennis Crall" <dennis-crall at uiowa.edu> wrote:
> 
>> 
>> I just solved some encoding issue with PHP's utf8_encode().
>> 
>> http://us3.php.net/manual/en/function.utf8-encode.php
>> 
>> Not sure it will solve your problem but worth a try.
>> 
>> 
>> On 10/10/05 10:57 AM, "Kevin Drennan" <kevin at santafe.edu> wrote:
>> 
>>> I've got a user who managed to break one of my forms by inputing a
>>> MacRoman smart quote that they pasted from another application. Does
>>> anyone have a strategy for converting this character to something
>>> safe? As far as I can tell htmlentitites() doesn't support the
>>> MacRoman character set.
>>> 
>>> Thanks,
>>> Kevin
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> 
> 
> ---------------------------------------------------------------------
> Marisa Smith, President
> DataSmith Consulting, LLC
> 9206 Huron River Drive
> Dexter, MI 48130
> Phone: (734) 426-8077
> Fax: (734) 426-7069 ­ NEW!
> http://www.datasmithconsulting.net
> Filemaker Solutions Alliance Associate Member
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list