Re: [flexcoders] Problem sending swedish characters from flex to php (amfphp)

2008-01-27 Thread Max Frigge
Hey,

have you checked the charset settings in your gateway.php??

cheers, Max

- Original Message 
From: ericbichara <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, January 28, 2008 6:59:30 AM
Subject: [flexcoders] Problem sending swedish characters from flex to php 
(amfphp)










  



Hi all,



Im having some problems sending special characters (swedish characters

ä, ö, and å) from Flex to a Database through AMFPHP. When inserting

these types of characters directly from php in the database,

everything works fine. ie



INSERT INTO TABLEX VALUES ('äää');



And fetching from the database into php and to Flex also works like a

charm. Im guessing its something to do with my phpenconding when

recieving the characters from Flex or something with amfphp. Any ideas

would be greatly appreaciated. Btw, im using Flex2/3, Amfphp 1.9beta2,

and a mySQL db.



/Eric






  
























  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] Problem sending swedish characters from flex to php (amfphp)

2008-01-27 Thread Ben Marchbanks
What I have learned is that the best practice is to enforce UTF-8 encoding at 
every stage -

What I do:

Setup mySQL "character set"  and "collation" to - UTF-8 unicode

I have not worked with AMFPHP but using PHP I establish UTF-8 encoded at the 
beginning of all PHP scripts that handle data.

iconv_set_encoding("input_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "UTF-8");
iconv_set_encoding("internal_encoding", "UTF-8");

These are essentially the same as the mySQL_query('SET NAMES, UTF8')

WARNING: If you call the iconv_set in PHP  do not also call the 
mySQL_query('SET NAMES, UTF8') as this is redundant and will cause UTF8 encoded 
characters to be re-endcoded to UTF8 which seriously mangles the data.

This setup is working fine though I have not tried to handle swedish but I know 
it does support french without any problems.

HTH

ericbichara wrote:
> 
> 
> Hi all,
> 
> Im having some problems sending special characters (swedish characters
> ä, ö, and å) from Flex to a Database through AMFPHP. When inserting
> these types of characters directly from php in the database,
> everything works fine. ie
> 
> INSERT INTO TABLEX VALUES ('äää');
> 
> And fetching from the database into php and to Flex also works like a
> charm. Im guessing its something to do with my phpenconding when
> recieving the characters from Flex or something with amfphp. Any ideas
> would be greatly appreaciated. Btw, im using Flex2/3, Amfphp 1.9beta2,
> and a mySQL db.
> 
> /Eric
> 
> 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


[flexcoders] Problem sending swedish characters from flex to php (amfphp)

2008-01-27 Thread ericbichara
Hi all,

Im having some problems sending special characters (swedish characters
ä, ö, and å) from Flex to a Database through AMFPHP. When inserting
these types of characters directly from php in the database,
everything works fine. ie

INSERT INTO TABLEX VALUES ('äää');

And fetching from the database into php and to Flex also works like a
charm. Im guessing its something to do with my phpenconding when
recieving the characters from Flex or something with amfphp. Any ideas
would be greatly appreaciated. Btw, im using Flex2/3, Amfphp 1.9beta2,
and a mySQL db.

/Eric