Internationalization HOW-TO / Roadmap
Greetings My organization has asked us to "internationalize" our storage management software. Naturally I thought why not do it in Farsi...this way I learn the technique and if that product ever comes to Iranthen so match the better... Basically I need some type of a high level hand-holding at this point, sort of "theory of operation" or "concepts" as what are the differing modules of an Internationalized software. My portion of this software is a CLI (command line interface) (aka console app for windows users). This code is to run on Linux, FreeBSD and Windows and is implemented in C/C++. I appreciate some help on this matter... Here are some random qeustions: 1- Would the existing input and output functions (such as iostream or C's I/O libs) continue to work, or do I need to change them? 2- Do I have a resource (or data type) issue, for example 7 bit ASCII vs Unicode. 3- If my program does currently string comparisons (as a CLI parser would do), how do I manage this problem. I though of a "translator module" to maximize reusability of the existing code. 4- Based on my brief reading, there seems to be a diverging set of encoding under various ISO, UTF-8, Unicode, etcshould I just use Unicode or in general what are the design issues in this regard. Anything else that you can think of would be nice... Thanks Mehdi DISCLAIMER: The information contained in this electronic mail transmission is intended by 3ware for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged and should not be disseminated without prior approval from 3ware ___ PersianComputing mailing list [EMAIL PROTECTED] http://lists.sharif.edu/mailman/listinfo/persiancomputing
RE: What is address and telephone format for Iran
I'd say the first format is more correct...at one point (while living in Iran) I used the following format for my company address and it worked. Medi Montaseri Dorsa Shabakeh 6-46 Motahari Blvd Shiraz, Iran 71834 In contrast with Medi Montaseri Dorsa Shabakeh Motahari Blvd, Kocheh 6, Pelak 46 71834 Which is basically imposing the American standard -Original Message-From: hameed afssari [mailto:[EMAIL PROTECTED]Sent: Wednesday, January 21, 2004 5:01 PMTo: [EMAIL PROTECTED]Subject: What is address and telephone format for Iran Hi; I wanted to know if there is a standard format for Postal address and telephone numbers in Iran. In some publication the following format is used. while usually the following format is used by majority of people - || || - || - - -- <|ZipCode|> The item enclosed in | | are optional. Please state your source if you are giving an answer. THanks; Hameed Check out the new MSN 9 Dial-up - fast & reliable Internet access with prime features! DISCLAIMER: The information contained in this electronic mail transmission is intended by 3ware for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged and should not be disseminated without prior approval from 3ware ___ PersianComputing mailing list [EMAIL PROTECTED] http://lists.sharif.edu/mailman/listinfo/persiancomputing
DB and Date data type
Hi, I was wondering how Date data type is dealt with in such databases as PostgreSQL or mySQL? Databases usually have Date related operations such as equality, less than, greater than, etc . But most databases have the Gregorian Calendar and not Jalalian. Any solutions or hacks? Thanks Mehdi ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
info@farsiweb.info
Hi, I have emailed "[EMAIL PROTECTED]" over a week ago with no reply/avail. Anyone knows of any other way to contact farsiweb.info folks. I had some contribs Thanks Mehdi ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: info@farsiweb.info
Hi Behdad Hope all is well... Sure, I can just post the contrib here... Basically it is "Yet Another Calendar" but in Perl... I am contributing a Perl class called Jalali.pm and an application using this class called pcal(1). pcal(1) is intended to operate very similar to Unix cal(1). pcal(1) use Jalali.pm to do its job. Currently it displays the month just as cal would do with no argumentsmore features such as as showing the entire year and a specific month of a yearlater... Jalali.pm is Perl class encapsulating Jalali and Gregorian operations. The basic idea is that an object of this class uses the Unix Tick Count as its internal clock. You can seek into future or past on UTC axiam or continum and surface in Gregorian or Jalalian. Both pcal(1) and Jalali.pm are available at http://montaseri.net/download Feedbacks, bug reports, and feature requests are welcomed. Mehdi Montaseri On 6/3/05, Behdad Esfahbod <[EMAIL PROTECTED]> wrote: Hi there,We "FarsiWeb" guys are hearing here. That's indeed the way tocontact FarsiWeb people, but we're a bit late on reply all thetime. Sorry for that. BTW, if you have any contributions, why not just post them here?behdadOn Sat, 4 Jun 2005, Medi Montaseri wrote:> Hi,>> I have emailed "[EMAIL PROTECTED]" over a week ago with no reply/avail. > Anyone knows of any other way to contact> farsiweb.info<http://farsiweb.info>folks.>> I had some contribs >> Thanks> Mehdi>--behdadhttp://behdad.org/ ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: Date data type in MySQL
Thanks Mohsen...On 6/5/05, mohsen ali momeni <[EMAIL PROTECTED]> wrote: > Hi,>> I was wondering how Date data type is dealt with in such databases> as PostgreSQL or mySQL?>> Databases usually have Date related operations such as equality,> less than, greater than, etc . But most databases have the Gregorian > Calendar and not Jalalian.>> Any solutions or hacks?Jalali calender is not implemented in MySQL yet. But MySQL doesn'tcheck the validity of Date entered. I mean you can enter any date having day part from 1 to 31. So Jalali Date can be saved in Date datatype of MySQL. Also operations such as equality or .. works fine withit. The only problem is the Add_Date, Sub_Date and functions like that which doesn't work for Persian Date. A Multi-Calender system for MySQLis going to be developed in near future (probably by me) so if youneed the full functionality, you should wait till then.Regards, --__ \ /_\\_-//_ Mohsen A. Momeni< __\ _ /_ www.momeni.us.tc___PersianComputing mailing list PersianComputing@lists.sharif.eduhttp://lists.sharif.edu/mailman/listinfo/persiancomputing ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: DB and Date data type
Thanks Amir Behzad I enjoyed browsing the ICC site...very cool... Yes, that was my guess as well...ie apps would have to convert back-and-forth before commiting them to DB tables... In fact that is why I worte a Perl class/package so that such apps could use it to store a decimal number (actually the Unit Tic Count) in the DB tables which then would allow some ops like equal, less than, etc... I also noted a pgbe work by Behdad for the PostgreSQL engine which seems to have solved some locale issuesand that PostgreSQL does have some localization features including LC_TIME (Formatting of Dates and Times) but that might be just Year/Month/Day vs Month/Day/Year type of deals... Thanks and keep up the good work... Mehdi MontaseriOn 6/7/05, AmirBehzad Eslami <[EMAIL PROTECTED]> wrote: On Saturday, June 04, 2005 10:18 AM, Medi Montaseri <mailto:[EMAIL PROTECTED]> wrote: > Databases usually have Date related operations such as equality,> less than, greater than, etc . But most databases have the Gregorian> Calendar and not Jalalian.> Any solutions or hacks? Dear Medi, We have faced with a similar problem at IranCivilCenter.com[1] before.The Persian Registration Form[2], asks people to specify their Birth Date in Jalali.But the "Server-side Form Processor", converts this "Submitted Jalali Date" to "Gregorian"; making it suitable to be saved to DB (MySQL). When we want to display users's information, we convert the saved Gregorian date to Jalali. [3][4] There are some useful libraries for Gregorian-to-Jalali date conversion at http://sourceforge.net/projects/farsitools/ Storage:Jalali Date --> Convert to Gregorian --> Save to DB Retrieval:Gregorian --> Convert to Jalali --> Display on Browser [1] http://www.irancivilcenter.com/[2] http://www.irancivilcenter.com/sign_up/signup_step2_fa.php[3] http://www.irancivilcenter.com/engineers/profile_f.php?UID=351[4] http://www.irancivilcenter.com/engineers/profile.php?UID=351 Hope this helps,Behzad - Original Message - From: Medi Montaseri To: persiancomputing@lists.sharif.edu Sent: Saturday, June 04, 2005 10:18 AM Subject: DB and Date data type Hi,I was wondering how Date data type is dealt with in such databasesas PostgreSQL or mySQL?Databases usually have Date related operations such as equality,less than, greater than, etc . But most databases have the GregorianCalendar and not Jalalian.Any solutions or hacks?ThanksMehdi ___PersianComputing mailing listPersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Jalali.pm Ver 1.2 with Farsi Support
Hi, I just released Jalali.pm ver 1.2 available at http://montaseri.net/download Briefly, Jalali.pm is a Perl Module for Jalalian and Gregorian calander conversion and Time Traveling (N days ago, N days ahead, etc). Version 1.2 also supports FArsi and ENglish, such that you can get things like $obj = Jalali -> new ( -Lang => 'FA' ); $Today = $obj->getTodaysDate(); print "$Today \n"; And you'll get یکشنبه ۲۰ شهریور ۱۳۸۴ Or you can say $Today = $obj-> getTodaysDate( ' Greg '); print "$Today \n"; An you 'll get یکشنبه ۱۱ سپتامبر ۲۰۰۵ Behdad please update FarsiWeb at your discretion. Thanks ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode
One solution would be to augment a DB capability at the application level. That is instead of the search or select qualified by a SQL where clause, simply get everything (select *) and then let the application filter what you want. Then when your given DB provides that operation by itself, simplify your application and deligate that to DB (Query Engine). I'm not sure about PHP support of unicode, but I know Perl is pretty strong on Regular Expressions with support for Unicode as well... MediOn 11/24/05, Behnam Esfahbod <[EMAIL PROTECTED]> wrote: AmirBehzad Eslami wrote:> 2) Find another Web Hosting Company with PHP and MySQL 4.1 support.>> Would you (or anyone else in the list) recommend a reliable Web Hosting> Company with such services?! >You may like to see www.1and1.com. It's been our web hosting for 2years now.-- ' ' Behnam Esfahbod' * .. http://zwnj.org * ` * http://zwnj.info * o * http://behnam.esfahbod.info___PersianComputing mailing list PersianComputing@lists.sharif.eduhttp://lists.sharif.edu/mailman/listinfo/persiancomputing ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Bad Farsi Fonts or something
Hi I am having some problems with my Farsi fonts on my browser and in gedit on a Linux box (Fedor Core 4, Gnome ) My problem is Letter "Ye" is always rendered as though it was an independent or detatched letter. For example, in the word "MILI" (as in mili-second) all the "Ye" letters are rendered as it would with "MEHDI" where "ye" is not connected to "de". Some help is appreciated. Thanks Medi ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: Bad Farsi Fonts or something
Ok...so I downloaded http://www.farsiweb.info/font/farsifonts-0.4.zip and my unzip(1) program said [EMAIL PROTECTED]:/tmp/download/farsi> unzip farsifonts-0.4.zip Archive: farsifonts-0.4.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of farsifonts-0.4.zip or farsifonts-0.4.zip.zip, and cannot find farsifonts-0.4.zip.ZIP, period. [EMAIL PROTECTED]:/tmp/download/farsi> Then I used my friends Windows box, unpack it, shipped it over to my linux box and used kcontrol to install it, confirmed via gnome-font-properties(1) that my GNOME desktop sees them as well...and I chosed Roya for my Application Font, Desktop Font, Windows Title Font But the problem still remains Also, I didn't know what to do with the fonts.conf file you pointed out, should I download and put in it my $HOME/.fonts.conf ...funny thingthe faulty operations I described can be fixed by pressing shift-d , that is regular 'd' generates the bad "ye" and 'shift-d' generates the correct version... I have done this before on FC2 and FC4 in KDEthis is my new FC4 box which I had to switch to gnome because the alt-shift keyboard switching was'nt working on KDE...anyway, I should'nt polute the problem... Thanks guys... MediOn 12/2/05, Behdad Esfahbod <[EMAIL PROTECTED]> wrote: On Fri, 2 Dec 2005, Medi Montaseri wrote:> Hi> I am having some problems with my Farsi fonts on my browser and in gedit> on a Linux box (Fedor Core 4, Gnome )>> My problem is> > Letter "Ye" is always rendered as though it was an independent or> detatched letter. For example, in the word "MILI" (as in mili-second) all> the> "Ye" letters are rendered as it would with "MEHDI" where "ye" is not > connected to "de".Basically, you don't have good fonts, and that's the default onFC4 unfortunately :(. You need to install the FarsiWeb fontspackage (available from http://farsiweb.info/) to start with.There is a fontconfig configuration file like this one: http://www.cs.toronto.edu/~behdad/fonts-persian.conf This will be included in fontconfig-2.4 release coming soon.> Some help is appreciated.> Thanks> Medi--behdadhttp://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"-- Dan Bern, "New American Language" ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: Bad Farsi Fonts or something
Thanks Hedayat... I'll try these and get back with you. Yes, I also go after the xorg.conf... In FC4, KDE although I had made the changes in my xorg.conf, it would require two actions to get the Farsi keyboard layout, one is to click on the tray icon (informing kde window manager) and then the alt-shift. The usual procedure I have used before is simply to make the necessary changes within X, and the key-sequence does the job, regardless of what window manager (or desk top, kde or gnome, etc) is used...in gnome env, I don't have that 2 action problem...hence my desktop selection.. I'm home now, I'll report on Mondaythe mis-behaving box is at work...I guess that's what one gets when corporate IT guys insists on provisioning computers and such... MehdiOn 12/3/05, Hedayat Vatankhah <[EMAIL PROTECTED]> wrote: Hi, Medi Montaseri <[EMAIL PROTECTED]> wrote on ۰۵/۱۲/۰۳ 05:48:49: Ok...so I downloaded http://www.farsiweb.info/font/farsifonts-0.4.zip and my unzip(1) program said You may need to download the file again. (I've downloaded it last year and it works) funny thingthe faulty operations I described can be fixed by pressing shift-d , that is regular 'd' generates the bad "ye" and 'shift-d' generates the correct version... This is the Arabic "ye" which you see using shift-d. I don't know about the Roya font you have, but I have one without any problem with Persain "ye". Anyway, your problem may be fixed by removing that unusable ugly fonts in /usr/share/fonts/bitmap-fonts: 9x15.pcf, 9x15b.pcf and another one which I think it's name was 10x*.pcf (I don't remember the * part, but it looks like that there is only one font starting with 10x). (Removing these files is the first thing I do after installing a Fedora version on a system). Finally, if you want more fonts than farsiweb fonts; I recommend using free B* fonts such as B Roya. I have done this before on FC2 and FC4 in KDEthis is my new FC4 box which I had to switch to gnome because the alt-shift keyboard switching was'nt working on KDE...anyway, I should'nt polute the problem... I don't know about your problem, but I always prefer to change X configuration file for Persian typing support. With this, you don't need to set it up for each user and for each desktop system. It works everywhere! It is very easy too: open the X config file (/etc/X11/xorg.conf in Fedora) as root and find this line: Option "XkbLayout" "us" Then, replace this line with these lines: Option "XkbLayout" "us,ir" Option "XkbOptions" "grp:alt_shift_toggle,grp:win_switch,grp_led:scroll" Save this file and restart the X window system. After this, you should be able to switch between Persian and English with Alt+Shift, or switching temporary by holding Win key (only left one in FC4); and the scroll lock LED will be on when you can type in Persian. Good Luck, Hedayat Thanks guys... Medi On 12/2/05, Behdad Esfahbod <[EMAIL PROTECTED] > wrote: On Fri, 2 Dec 2005, Medi Montaseri wrote: > Hi > I am having some problems with my Farsi fonts on my browser and in gedit > on a Linux box (Fedor Core 4, Gnome ) > > My problem is > > Letter "Ye" is always rendered as though it was an independent or > detatched letter. For example, in the word "MILI" (as in mili-second) all > the > "Ye" letters are rendered as it would with "MEHDI" where "ye" is not > connected to "de". Basically, you don't have good fonts, and that's the default on FC4 unfortunately :(. You need to install the FarsiWeb fonts package (available from http://farsiweb.info/) to start with. There is a fontconfig configuration file like this one: http://www.cs.toronto.edu/~behdad/fonts-persian.conf This will be included in fontconfig-2.4 release coming soon. > Some help is appreciated. > Thanks > Medi --behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language" ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: viewing farsi font in console
I remeber being able to do this on Unix/Linux long time ago...as far back as 1990sback then on SCO, AT&T SVR4 x86 (386 PCs) and then Linux... See manpages on setfont(8) unicode_start(1) unicode_stop(1) loadunimap(8) And google for "hebrew console"...that community was on top of this issue and I was using their tools and findings to solve this problemmy final conclusion was Grahpical Interfaces will win at the end... You can also use the X environment and run an app that looks like a curses based app ... I'd be interested in learning about the application of this technology And finally Operating Systems are pretty much alike. If you can do something in Dos, Windows, you can do it in Linux as wellsome would let a userspace app take over the kernel and do what ever you want (like DOS) and some only demand that you write a device dirver to take over the kernel... Cheers Medi On 12/11/05, Behdad Esfahbod <[EMAIL PROTECTED]> wrote: On Sun, 11 Dec 2005, Behnam Esfahbod wrote:> Mohsen Pahlevanzadeh wrote:> > Dear all,> > I need to my user see farsi fonts in console without running X.> > does ncursess library has capability of this function? >> No.The new Debian installer fancies a bidi capable NEWT+slang stack.No ncurses I'm afraid.> > If it hasn't that,Please guide me that i can do it.>> You should use BiCon (Bidirectional Console) from Arabeyes project that > uses FriBidi and some of Behdad's Farsi Console.Yeah, that's probably the easiest way. You may only need thefont though.> 1-http://www.arabeyes.org/project.php?proj=BiCon > 2-http://www.arabeyes.org/> 3-http://www.fribidi.org/--behdadhttp://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"-- Dan Bern, "New American Language"___PersianComputing mailing list PersianComputing@lists.sharif.eduhttp://lists.sharif.edu/mailman/listinfo/persiancomputing ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing