Re[2]: [PHP-DB] Special chars & UTF-8: sometimes ok, sometimes wrong
>> I serve a UTF-8 header within my HTML, Apache is configured to serve >> UTF-8 and PHP scripts are saved in UTF-8 charset. >> However, this is a very odd issue, since it happens only with text >> taken from DataBase, but not from texts written in scripts :( >> >> Any similar experience? yes, it depends of the translation between tables and html pages. I manage frequently standard configurations in Apache for Spanish websites. On my view, it's better not changing the Apache configuration. Instead that, be focused in having a latin_set characters in your Mysql tables, in example latin1_swedish_ci. As a guide, when I open phpMyAdmin, I have my tables with latin1_swedish_ci in where appears España. Then, having the HTML pages with it works without problems. You can use use the PHP utf8_decode() function but it will be a hard work for all variables in the whole site. If you are now in a mess, I recommend you putting the Apache configuration in the standard way. Restart, and load your HTML page, changing the page codification using UTF and ISO-8859-1. In this way, you can know what codification demands your HTML page to show DB dates in a right way according the actual state of you tables. If still you are not able to see the characters in any way, then you can export and re-import your tables choosing a latin1_set and then problem will be solved using UTF-8 in the HTML pages. But if you change Apache configuration, it can interfere with other previous scripts or tables, I don't recommend you. It is my experience. Hope it helps, Vicente, -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Special chars & UTF-8: sometimes ok, sometimes wrong
> Hi. > > Working with PHP 4.4 and mySQL 4.1, I've got some texts stored in a > UTF-8 table with special chars. > > I serve a UTF-8 header within my HTML, Apache is configured to serve > UTF-8 and PHP scripts are saved in UTF-8 charset. > > However, sometimes I get 'España' and other times 'Espa�a'. The > difference? I press F5 (Refresh) bottom on my web browser (I use > Firefox and Internet Explorer). > > This is the first time I experience this issue. > > When I have suffered problems with special chars I use utf8_decode or > utf8_encode, but I always try to store text data in UTF-8 charset and > serve them always with UTF-8 PHP scripts. > > However, this is a very odd issue, since it happens only with text > taken from DataBase, but not from texts written in scripts :( > > Any similar experience? Yes. MySQL 4.1.20-log with columns in utf8_unicode_ci Collation. PHP 4.3.10 serving web pages with charset=UTF-8 read from the MySQL column above. In the html page: If I echo utf8_encode($fieldFromDB) it looks good. If I remove utf8_encode, it looks bad. After submitting the html form, if I send an html email (setting charset=UTF-8) or store it back into the utf8_unicode_ci Collation column, it looks bad. HOWEVER, I am using characters from the extended ascii table http://asciitable.com/ We have people from different countries using the same scripts and database. I thought utf8_unicode_ci should handle all or most. What should I be using? Also, in the html form, I have method="post" enctype="multipart/form-data". Is there a form property needed as well? _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
[PHP-DB] Special chars & UTF-8: sometimes ok, sometimes wrong
Hi. Working with PHP 4.4 and mySQL 4.1, I've got some texts stored in a UTF-8 table with special chars. I serve a UTF-8 header within my HTML, Apache is configured to serve UTF-8 and PHP scripts are saved in UTF-8 charset. However, sometimes I get 'España' and other times 'Espa�a'. The difference? I press F5 (Refresh) bottom on my web browser (I use Firefox and Internet Explorer). This is the first time I experience this issue. When I have suffered problems with special chars I use utf8_decode or utf8_encode, but I always try to store text data in UTF-8 charset and serve them always with UTF-8 PHP scripts. However, this is a very odd issue, since it happens only with text taken from DataBase, but not from texts written in scripts :( Any similar experience? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] email HTML code showing in Eudora
I have the following code that so for works perfect for all email programs EXCEPT Eudora. With Eudora, the entire code after the first ?>, starting at "--PHP-alt" just pops into the body of the email. Anyone know of a fix for Eudora that will still allow the rest of the world to see it correctly? --PHP-alt- Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello World!!! This is simple text email message. --PHP-alt- Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello World! This is something with HTML formatting. --PHP-alt--- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php maximum characters in text field
I have always called them curly quotes and when I Googled "curly quotes in php", I came up with the script I sent yesterday. But, I think you are right. -Original Message- From: Niel Archer [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 17, 2007 5:39 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] php maximum characters in text field Hi > Does anyone know how to look for a "Curly quote" or "typographer's quotation mark". Do you mean the equivalent of the left and right double quote entities in HTML (or 66's and 99's as we called them at school)? -- Niel Archer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php