Setting different Character sets within my PHP and HTMl pages to display correctly?

There is a character encoding setting inside of your php.ini file. By default, this is set to the standard Latin encoding (ISO-8859). If you would like to encode your page with different characters, like Arabic or Hindi, you will need to change this.

Most character sets will display correctly with UTF-8 encoding. If you're using an Asian character set, you may need to select a different encoding standard; you can find out specific information about which character encoding will display your characters correctly here.

You can find your php.ini file in this directory:

/public_html/php.ini

To change the character encoding in your php.ini file, find the following line and input your preferred character encoding. In the example below, UTF-8 is the character set.

default_charset = "UTF-8"

Note that by default, the default_charset option is commented out. Be sure to delete the leading semi-colon so it does not look like this:

;default_charset = "UTF-8"

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

FastCGI for PHP

FastCGI for PHP FastCGI for PHP makes all your PHP applications run through mod_fcgid instead...

Protecting the php.ini file from being viewed

To prevent people to viewing your php.ini file via a browser a few lines need to be pasted into...

Configuring the PHP Environment With php.ini

The servers use a master php.ini file for all directories without a php.ini file in it. You will...

Upload_Max_Filesize

In a nutshell: Locate the php.ini file in the folder your upload script resides in. If none...

How do I enable PHP 5 for my PHP applications?

1. Login to your Control Panel and click the PHP Config icon. 2. Select PHP5 (Single php.ini)....