Search the Community
Showing results for tags 'encoding'.
-
I have just typed out index.php for chapter 17, and the language drop down menu displays funny characters instead of the language specific letters. I typed the scripts as shown in the book. How can I debug this, is it my Xampp settings, I checked and it says the language is set to US in Xampp. In the book it says to save my page using utf-8 encoding. I don't know if that is the problem, I just saved my index.php page with the name index.php, in dreamweaver I don't see an option for the encoding to use for the page. In my header file the encoding is set to utf-8 and that file is included in index.php, so won't that do it.
-
Mentioned in the book in especially Chapter 14: Making Universal Sites and Chapter 15: Message board example, are recommendations for processing unicode safe data. We learn that utf-8 supports a wide list of languages. There was so much information to digest, I could not recall if every action is required when building a universal/multilingual site. Are all of these set by default? Particularly the database character set. My mySQL is already set as (actually copied this straight from phpMyAdmin) utf8_unicode_ci Unicode (multilingual), case-insensitive Would I then have to establish a charset and collation for the database? Are these actions needed each time, here is a list I gathered up while reading. Added to inbetween the head tags <meta http-equiv="content-type" content="text/html; charset=utf-8"> -> Page 416-417 Must be the first line before any HTML, must be a php script page header('Content-Type: text/html; charset=UTF-8'); -> Page 452 (and more information in Chapter 14) Mysql Client CREATE DATABASE forum2 CHARACTER SET utf8; -> Page 444 mysql_connection mysqli_set_charset($dbc, 'utf8'); or mysqli_query($dbc, 'SET NAMES utf8'); -> Page 450 Any one with some insight on this great appreciated with any comments. -Mark