Re: [PHP] Encoding help!

2005-04-20 Thread Petar Nedyalkov
On Wednesday 20 April 2005 03:05, Brian Dunning wrote:
 I know this is a common question but I have RTFM and STFW until I'm
 blue in the face - I really need some help here.   :)

 I've got some forms into which users are going to enter text that
 frequently contains funny characters (pilcrows, foreign text, etc). So
 I need to encode it before writing it into MySQL, and decode it when
 reading it back out and writing it to the page. I've tried
 base64_encode/base64_decode, rawurlencode/rawurldecode,
 utf8_encode/utf8_decode, combinations, and others. My MySQL table is
 set to use UTF8 and my web pages are all set to UTF8. Most of what I've
 tried takes:

 

 And when I read it from MySQL and output it to the web page, it's
 turned into:

 

What is the default content-type of the webserver you use?
What is the content-type you return to the user through your php scripts?


 I need some help here! Thanks.  :)  :)  :)

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpvr6EmSkXr5.pgp
Description: PGP signature


Re: [PHP] Encoding help!

2005-04-20 Thread Jochem Maas
Petar Nedyalkov wrote:
On Wednesday 20 April 2005 03:05, Brian Dunning wrote:
I know this is a common question but I have RTFM and STFW until I'm
blue in the face - I really need some help here.   :)
I've got some forms into which users are going to enter text that
frequently contains funny characters (pilcrows, foreign text, etc). So
I need to encode it before writing it into MySQL, and decode it when
reading it back out and writing it to the page. I've tried
base64_encode/base64_decode, rawurlencode/rawurldecode,
utf8_encode/utf8_decode, combinations, and others. My MySQL table is
set to use UTF8 and my web pages are all set to UTF8. Most of what I've
if mySQL is setup for UTF8 I thought that you didn't need to encode the 
data...?
assuming you have told the browser to send UTF8 (which you seem to have) and it 
does.
tried takes:

And when I read it from MySQL and output it to the web page, it's
turned into:


What is the default content-type of the webserver you use?
What is the content-type you return to the user through your php scripts?

I need some help here! Thanks.  :)  :)  :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Encoding help!

2005-04-19 Thread Brian Dunning
I know this is a common question but I have RTFM and STFW until I'm 
blue in the face - I really need some help here.   :)

I've got some forms into which users are going to enter text that 
frequently contains funny characters (pilcrows, foreign text, etc). So 
I need to encode it before writing it into MySQL, and decode it when 
reading it back out and writing it to the page. I've tried 
base64_encode/base64_decode, rawurlencode/rawurldecode, 
utf8_encode/utf8_decode, combinations, and others. My MySQL table is 
set to use UTF8 and my web pages are all set to UTF8. Most of what I've 
tried takes:


And when I read it from MySQL and output it to the web page, it's 
turned into:


I need some help here! Thanks.  :)  :)  :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php