ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Arabic-utf-8 (plus a sample)
@ 2004-06-05 19:32 Idris Samawi Hamid
  2004-06-05 20:41 ` Thomas A. Schmitz
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Idris Samawi Hamid @ 2004-06-05 19:32 UTC (permalink / raw)
  Cc: aleph

Hi gang,

For Arabic we use a Latin transcription in Aleph/(e-)Omega (or even 
ArabTeX) unless one of the encoding filters like utf-8 is used. Even for 
utf-8 files, however, it would be very useful to be able to convert a 
utf-8 file to Latin transcription for further processing by 
Aleph/(e-)Omega. For example, adding diacritics is much easier to do in 
Latin than in an Arabic script editor because Latin transcription is 
one-dimensional and adding diacritics to Arabic is a 2-dimen affair.

The best thing would be a perl script but I don't know perl at all (except 
to run some some precreated scripts). If someone out of the kindness of 
their heart could write a short and simple script for just seven 
characters I could do the rest myself and present it back here.

Now all of the Arabic charachters in utf-8 can be represented by extended 
ascii. I need something like this, that converts every extended ascii 
representation of Arabic utf-8 into a Latin transcription:

ا => A

ب => b

ج => j

د => d

Ù‡ => h

Ùˆ => w

ز => z

If someone could write a perl script that can accomplish the above 
conversion, I can manually fill in the rest of the script. Basically I use 
a modified version of the ArabTeX transcription.

Here is a "gift" in return: a sample utf-8 Arabic file that can be 
processed by Aleph/(e-)Omega in ConTeXt (you will probably need to dvips 
this, though some dvi-viewers can do the postscript/16-bit thing):

==============================================
\hoffset=0pt % for Omega bug: has this been fixed?

\def\ArabicUTF{\ocp\UTFArUni=inutf8 %% in88596
                %\ocp\UTFArUni=in88596
                \ocp\UniCUni=uni2cuni
                \ocp\CUniArab=cuni2oar
                \ocplist\UTFArOCP=
                \addbeforeocplist 1 \UTFArUni
                \addbeforeocplist 1 \UniCUni
                \addbeforeocplist 1 \CUniArab
                \nullocplist
                \pushocplist\UTFArOCP}

\input m-gamma.tex
\input type-omg.tex
\switchtobodyfont[omarb,12pt] %

\textdir TRT%
\pardir TRT%
\ArabicUTF

\starttext

، ؛ ؟ ء آ أ ؤ إ ئ ا ب ة ت ث ج ح خ د ذ ر ز س
ش ص ض ط ظ ع غ ـ ف ق ك ل م ن ه و ى ي

\blank[big]

%ً  ٌ  ٍ َ  ُ ِ ّ

Ù’ Ù  Ù¡ Ù¢ Ù£ Ù¤ Ù¥ Ù¦ Ù§ Ù¨ Ù© Ùª Ù« Ù¬ Ù° Ù± Ù² Ù³ Ù´ Ùµ Ù¶ Ù·
ٸ ٹ ٺ ٻ ټ ٽ پ ٿ ڀ ځ ڂ ڃ ڄ څ چ ڇ ڈ ډ ڊ ڋ ڌ ڍ
ڎ ڏ ڐ ڑ ڒ ړ ڔ ڕ ږ ڗ ژ ڙ ښ ڛ ڜ ڝ ڞ ڟ  ڢ ڡ ڢ ڣ
Ú¤ Ú¥ Ú¦ Ú§ Ú¨ Ú© Úª Ú« Ú¬ Ú­ Ú® Ú¯ Ú° Ú± Ú² Ú³ Ú´ Úµ Ú¶ Ú· Úº Ú»
ڼ  ھ ۀ ہ ۃ ۄ ۅ ۆ ۇ ۈ  ۉ ۊ ۋ ی ې ۑ ے ۓ ۔ ە ۰
Û± Û² Û³ Û´ Ûµ Û¶ Û· Û¸ Û¹

\blank[big]

ـً ـٌ  ـٍ ـَ  ـُ ـِ ـّ  ـْ ـٰ

ا ب ج د ه و ز

\stoptext

==============================================

Best
Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2004-06-07 20:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-05 19:32 Arabic-utf-8 (plus a sample) Idris Samawi Hamid
2004-06-05 20:41 ` Thomas A. Schmitz
2004-06-05 21:33   ` Idris Samawi Hamid
2004-06-05 21:48     ` Thomas A. Schmitz
2004-06-05 22:51       ` Idris Samawi Hamid
2004-06-05 23:15         ` Re[2]: " Giuseppe Bilotta
2004-06-05 23:31           ` Idris Samawi Hamid
2004-06-05 23:58             ` Re[4]: " Giuseppe Bilotta
2004-06-06  0:19               ` Idris Samawi Hamid
2004-06-06  0:26                 ` Idris Samawi Hamid
2004-06-06  9:09                 ` Perl scripting (was: Arabic-utf-8) Henning Hraban Ramm
2004-06-06 21:03                   ` Idris Samawi Hamid
2004-06-06 21:28                     ` Thomas A. Schmitz
2004-06-07 19:45                       ` Henning Hraban Ramm
2004-06-07 20:53                         ` Thomas A.Schmitz
2004-06-05 23:08 ` [SPAM: 3.411] Arabic-utf-8 (plus a sample) Richard MAHONEY
2004-06-06  0:19   ` Idris Samawi Hamid
2004-06-06 13:22 ` Arabic-utf-8 " George N. White III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).