Home
 

Customer Support

Search for keywords:

Browse by category:

How do I get different character sets to display
correctly?

If you would like to change the default character set for your PHP pages, please see this page.

Many web browsers display Western Character Encoding (ISO-8859-1) by default. This means that pages with text in a non Western alphabet, like Cyrillic or Arabic, will often look garbled. Unicode, on the other hand, is capable of displaying several alphabets; the standard Unicode encoding is UTF-8.

Not all character sets will be correctly rendered with this encoding format, but most will. You can find specific information about which character encoding will display here.

To ensure that your web page displays correctly across different web browsers and platforms (if it's not in English), you should take the following steps:

1. In your HTML document, insert an XML line which specifies your character encoding under your Doc Type Declaration (DTD). If you're using UTF-8, then the line will look like this:

<?xml encoding="UTF-8"?>

2. When coding your HTML, be sure to include a META tag in your header specifying the character set. If you're going to encode your page in Unicode, specify UTF-8 as your character set in the META tag. If you're going to use UTF-8 encoding, your META tag will look like this:

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

3. When saving your HTML, be sure that the character encoding is set to whatever you've specified it to be. If you choose UTF-8, then you will need to save your page in that type of encoding.

4. In your Modwest account, add an .htaccess file in the directory where your web pages using non Western encoding will be. If your entire site uses different characters, then you can put your .htaccess file in /htdocs. Inside of the .htaccess file, add this line:

AddDefaultCharset Off







User-Contributed Notes

add a note
There are no user-contributed notes for this topic.

Related Questions:


Why does my website just say "Error 403 Forbidden"?

How do I protect a directory with .htaccess?

How can I show a default page other than index.html?

How do I stop people from getting directory listings when I dont have an index page?

What do the different HTTP Status Codes like 200, 304, 404, 401, 403 mean?

What options are configured with Apache and what can I do with .htaccess files?

How do I protect a directory with mod_auth_mysql?

How do I stop other websites from using my bandwidth while they steal images, flash, etc. from my site?

Which Apache modules are installed?

How do I make my own Error Documents to replace the default ones like 404 Not Found?

How can I make apache recognize different MIME types?

The webservers' Gzip compression is messing up my XML or Flash files for Netscape 4 browsers. How do I turn off compression?

What webserver do you run?

Will I have access to raw logfiles?

I created a symbolic link, and now I am getting a 404 errors.

How do I stop the server from automatically correcting spelling mistakes in URLs or offering multiple choices for documents?

My mod_rewrite rules make my website stop loading.

Why am I getting a 412 Precondition Failed from a website?

How do I protect my website from comment spam?

How do I enforce the use of SSL on my website?

How do I redirect traffic to another web page?

Browse Categories:

Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales


Tiny Modwest Logo         Copyright 2000-2008 by Modwest, Inc.          About Us    |    Blog    |    Jobs    |    Web Design    |    Contact Us