[FX.php List] Re: Trouble working with CRs in text fields

Someone someone at gagayaya.com
Sat Jul 9 10:21:31 MDT 2005

Hi Dave,
I had a similar problem moving data from one table to around. My  
fields had French or Spanish characters (eg. é ñ)

Solution: if your storing the field in a variable
$test = $ReturnedData['data'][$currentKey]['test'][0];
then use the php function html_entity_decode
$test = html_entity_decode( $test,ENT_QUOTES,"UTF-8");

now you can add the data into the next table
$MemberQuery->AddDBParam('test2', $test);

if you want to display $test later in the page
use htmlentities( $test,ENT_QUOTES,"UTF-8");

use define("DEBUG", true); to look at the url strings
and you see differences in the string when find data in the 1st table  
when you move data to the 2nd table

the first url has unicode of the data
the second url has unicode for the html entities that represent the data

hope this helps and makes sense

> Message: 3
> Date: Thu, 07 Jul 2005 20:48:35 -0400
> From: "Dave Strickler" <dstrickler at mailwise.com>
> Subject: [FX.php List] Trouble working with CRs in text fields
> To: <fx.php_list at mail.iviking.org>
> Message-ID: <s2cd9549.069 at poa.emailsolutions.com>
> Content-Type: text/plain; charset="us-ascii"
> I am reading a good sized (could be 64k) text field from a FM7  
> database with fx.php, and writing it back to a different table in  
> the same database in FM7. Essentially I am 'moving' a record from  
> one table to another.
> When I read the field from the first table, I comes out with the  
> CRLF pairs as ASCII 10, which seems correct. Then I try and write  
> it back to a new record in the second table, and all I see are  
> little 'boxes', like it is trying to display the ASCII 10, but can't.
> Since the data is coming from FM7 and back into FM7 with no  
> changes, I am puzzled.
> I have tested on some pretty small text in the field, I can't  
> believe its a buffer overflow. I have the field indexed as UNICODE.
> Any clues?
> TIA,
> Dave Strickler
> MailWise LLC
> 617 267-0044 x810
> www.mailwise.com

More information about the FX.php_List mailing list