[FX.php List] - using fm_and_php gives character problems

William Downs w.downs at kon5.net
Fri Mar 27 12:46:44 MDT 2009


Yes, in the index.php -

but not in reg.php - this is an included file - of sorts - it uses a  
navi type, as in

if ($_REQUEST['what'] == 'reg') { header('Location: index.php? 
navi=reg'); }

However, when I look at the source code, I can see it there.

William

On 27 Mar 2009, at 18:26, Blair Duncan wrote:

> Do you have something like this within the <head> tags?
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
>
>
> On 27/03/09 2:16 PM, "William Downs" <william.downs at gmail.com> wrote:
>
>> Hi guys,
>>
>> I am having a problem with special characters -
>>
>> 1) I have a reg.php page for registration - contains a form (amongst
>> other stuff, validation etc)
>> 2) If validated, then the data is sent to Filemaker 9 Server, Mac OS
>> X, Apache) where it creates a new Customer record
>> 3) This happens per the FM_and_PHP class (not my choosing, I would
>> rather use FX of course.)
>> 3) HOWEVER, IF the data contains umlaut, and much of it does as it is
>> for a German company, then the umlaut has disappeared and in its  
>> place
>> is some rubbish ( example, instead of Müllmann, it will say  
>> Möllman )
>> I saw this by having the DB open, and once the registration  
>> successful
>> dialoge page was presented, looked at the record in Filemaker - this
>> is of course the garbage that the web user also sees
>> 4) The only way I can get round this is to use utf8_decode around
>> EVERY single value that is to be sent to the Filemaker DB
>>
>> Example  :
>>
>> $FM = new FM_and_PHP();
>>    $FM->setFileMakerHost("127.0.0.1","80",'7');
>>    $FM->setDatabaseUserPassword("webUser","webPassword");
>>    $FM->setDatabaseName('Customer');
>>    $FM->setDatabaseLayout('CustomerWeb');
>>    $FM->setCommand("new");
>>    $FM->addParameter('Name',utf8_decode($_POST['name']));
>>    $FM->addParameter('Vorname',utf8_decode($_POST['vorname']));
>>    $FM->addParameter('Strasse',utf8_decode($_POST['strasse']));
>>
>> etc, etc - I have to do it for every field that may contain Umlaut -
>> i.e. every text field.
>>
>> Surely this is NOT the correct way ?
>>
>> 1) I have a .php page open in BBEdit 9.1.1
>> 2) At the bottom of the page, I have the page in Unicode (UTF-8,  
>> no BOM)
>>
>> Where is this going wrong ? Or is this indeed what one must do in
>> order to get special characters into the DB ?
>>
>> Perplexed and puzzled -
>>
>> William
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
>
> Please consider the environment before printing this e-mail.
>
> This message and any attachments contain information, which may be  
> confidential or privileged. If you are not the intended recipient,  
> please refrain from any disclosure, copying, distribution or use of  
> this information. Please be aware that such actions are prohibited.  
> If you have received this transmission in error, kindly notify us  
> by e-mail to helpdesk at bbdo.com. We appreciate your cooperation.
>
> _______________________________________________
> 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