Re: Arabic MySQL Perl

From: Marco Cimarosti (marco.cimarosti@essetre.it)
Date: Mon Feb 19 2001 - 07:33:46 EST


George Zeigler wrote:
> my company is creating sites in multiple languages with pages being
created
> dynamically. The words are pulled into the pages from a MySQL database.
The
> programs are written in Perl. Our programmers cannot figure out how to
get
> Arabic and Hebrew working (right -> left languages). From what I've been
told,
> the data is stored properly in MySQL . But getting the right -> languages
to
> appear in the dynamically loaded pages only gives garbage.
> Any one have any experience in this are? Or is it necessary to do
> completely seperate programs?

What Arabic and Hebrew encodings are used to store text in your database?

Does the HTML header of your generated web pages properly specify the *same*
encoding?

To specify the document's encoding in an HTML file, you should add somewhere
inside the <HEAD>...</HEAD> a line like this:

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

Where I wrote "YourEncodingGoesHere", you should insert the identifier for
the encoding that you are using.

For Arabic, your encoding is probably one of these: iso-8859-6, ASMO-708,
DOS-720, windows-1256, x-mac-arabic.

For Hebrew, the most likely candidates are: iso-8859-8, iso-8859-8-i,
DOS-862, windows-1255, x-mac-hebrew.

For both languages you might be using Unicode, of course. Depending on the
UTF used, Unicode could correspond to one of these identifiers: utf-8,
unicode, utf-16, unicodeFFFE, utf-7.

See <http://www.w3.org/TR/html401/charset.html#doc-char-set> for more info
about this.

Also see
<http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset4
.asp> for an unofficial list of character sets that may be used in web
pages.

Moreover, you might need to specify the language and/or directionality of
parts of the page, especially if you have pages with multiple languages, or
if you are using complex layout (tables, etc.). See
<http://www.w3.org/TR/html401/struct/dirlang.html> for more info about this.

Hoping this helps.
_ Marco



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:19 EDT