Unicode on webpages      contents

Is it possible to use several alphabets on a single page without resorting to frames?

Catalogue of Lithuanian libraries You can't use several encodings, but it isn't a problem for using several languages. You need to use universal UTF-8 encoding.

For example FrontPage, MSWord, AceHTML Freeware, Dreamweaver MX, Unipad and other HTML editors allow to create HTML in that encoding.
As usual don't forget to verify if there is "charset" declaration at the beginning of webpage so that reader would be able to see the page properly without charset guessing and manual selection from menu:

<meta http-equiv="content-type"
	content="text/html; charset=UTF-8">
<title>Unicode on the Internet</title>

It is better to put "title" above "http-equiv" if "title" may contain non-english symbols.

Apache web server since v1.3.12 has additional AddDefaultCharset directive to specify charset parameter in HTTP headers. If it is turned, on all HTTP responses contain charset parameter (often it is iso-8859-1) and it overrides META in HTML text. In that case you need to add AddDefaultCharset UTF-8 or AddDefaultCharset Off code into serverwide httpd.conf file or into .htaccess file in the local directory. You can verify if it works by connectiong to server IP, port 80 with "telnet" program, entering 2 lines below, and pressing "Enter" key twice:


HEAD /me/rch/ll.html HTTP/1.0
Host: www.MyDomain.com
 
HTTP/1.1 200 OK
Date: Wed, 13 Mar 2002 19:47:01 GMT
Server: Apache/2.0.28 (Unix)
Last-Modified: Sat, 23 Feb 2002 21:22:23 GMT
ETag: "206ee-4548-88f6e1c0"
Accept-Ranges: bytes
Content-Length: 17736
Connection: close
Content-Type: text/html; charset=UTF-8

In the sample server response above you can see charset parameter in Content-Type HTTP header.

Good detector for encoding declaration related errors is HTML validator by WWW Consortium.

HTML 4 additionally defines "lang" attributes that can be used with most HTML tags. It is mostly for search engines, however for example Mozilla can use "lang" in Unicode HTML to choose proper fonts, and to avoid mix of fonts for latin script text with accented letters, or wrong font style for East Asia languages you need to use "lang". Example:

<html lang="en">
    <div lang="en">„ąčęėįšųūž“</div> <div lang="ru">Русский</div>

Some sample sites successfully using Unicode for many years:
Google search, Altavista search, Central Europe Review weekly,



  Valid XHTML 1.0!