33dots

Posts RSS Comments RSS

Archive for August, 2009

To read and type Malayalam

A computer represents an alphabet [technically called language script] using a number code. The coding scheme which is currently used (ASCII) however only represents the English alphabet and numerals and some special characters.

Unicode is a new encoding scheme which represents all alphabets in all languages in the world. In Unicode, Malayalam first letter ‘a’ (അ) is given the code number 3333. Similarly, different numbers are given for rest of Malayalam alphabets. The fonts that understand this new encoding scheme are called Unicode fonts.

To read and type Malayalam properly in your computer you have to use Unicode Malayalam fonts. [The same also applies to other languages; to read and type a particular language you need to have the Unicode font of that language.]

To work using  a Unicode font of a language, we also need,

  • The Operating System support for displaying that language script [in our case support for displaying malayalam]. This is technically called font rendering support. If the OS has no proper support, we may still be able to view the language but there will be errors. In Malayalam we usually have problems like ‘Chillu’ and ‘diacritics’ [കേ, കൊ] etc.
  • A system for inputting the language script to the computer. Operating Systems usually support keyboard layouts for different languages. Once enabled, we could use the normal keyboard for inputting. For example, typing button ‘K’ inputs malayalam script ‘ക’ (ka).
  • Applications supporting Unicode scheme. Like notepad, IE, Word, Firefox etc. Almost all of the programs of the latest Operating systems support Unicode.

Using unicode, you can read and create malayalam text and websites, blog and chat in malayalam, and even search google in malayalam, See here for an example of searching google in malayalam .

Now lets see how this can be accomplished in various Operating systems,

Windows 95/98/Me/NT and 2000

These OS’s have no proper support for Malayalam script rendering. :(
Fortunately IE has good support and you can use it.

Install a Malayalam unicode font like AnjaliOldLipi. Download it from here.
Go to Control Panel > Fonts.  Choose File > Install font and browse to your font and click OK.

And use IE (ver 6 is good) to view malayalam pages, although the display may not be perfect.
On Internet Explorer 6: Go to Tools -> Internet Options. Click Fonts and Choose Malayalam and set AnjaliOldLipi as the font.

Check whether you can read malayalam at malayalam wikipedia.

To type Malayalam
They do not have direct support for inputting malayalam.

1. Try using the Inscript keyboard layout program from CDAC, Govt of India.
Download it from here. Unzip and doubleclick Setup.exe to install.
An icon should come at the taskbar which enables you to switch, keyboards. The key map is here.
[Please confirm if you have success in using this]

2. You could also try the methods specified for ‘typing Malayalam’ in Windows XP/2003, [except method 1].
Please see below.

Windows XP/2003

Windows XP SP2 and 2003 has default support for rendering Malayalam.

To enable it,
Go to Start > Control Panel.
If you are in “Category View” select the icon that says Date, Time, Language and Regional Options and then select Regional and Language Options.
If you are in “Classic View” select the icon that says Regional and Language Options.
Select the Languages tab and make sure the option saying Install files for complex script and right-to-left languages (including Thai) is checked. Click OK.
A confirmation message should now appear – press OK on this confirmation message to allow the OS to install necessary files from the Windows XP CD and then reboot if prompted.

Check whether you can read malayalam at malayalam wikipedia.

You should install AnjaliOldLipi font in any case. The default font provided by XP called ‘karthika‘ is not good and small.
Install AnjaliOldLipi malayalam unicode font.
Download from here.
Go to Control Panel > Fonts.  Choose File > Install font and browse to your font and click OK.

Enable firefox and IE to use this font.
For Firefox  Go to Tools > Options > Content.
You can see the Fonts & Colors section. Take Advanced.
Choose Malayalam from the Fonts for dropdown menu.
Now set AnjaliOldLipi in each of the dropdown list. Click Ok and Ok.

For IE, Go to Tools > Internet Options.
Click Fonts and Choose Malayalam form the Language Script dropdown menu
Set the font as AnjaliOldLipi in the below list box.

See IE, FF and notepad displaying malayalam in my windows XP, using the default font karthika. You can also see the keyboard layout switcher in the taskbar near system tray.
Malayalam pages displayed in Windows XP

To type Malayalam
1. Windows XP SP2 and 2003 has default support for typing malayalam. This is the Inscript keyboard layout from CDAC, Govt of India.
To enable it, Choose Regional and Language Options from Control Panel. On Languages tab click Details.
Click the Add button and Choose Malayalam(India). Click Apply.
Now Click Language bar… button and check Show Language bar… and Show additional language bar…
A menu will appear in the taskbar which allows you to select the malayalam keyboard. The key map is here.

Now you can type Malayalam directly into any application.

2. Use a keyboard mapper called Mozhi Keyman to type Malayalam directly into the computer in transliteration scheme[eg typing english keys 'ithu' will output malayalam 'ഇതു'.]
Download Mozhi keyman here and install it. Once it is installed you will see its icon(letter K) in system-tray. Click on it and choose ‘Mozhi’ to enable it. The icon will now change to malayalam (ക)
Use this mozhi scheme to type.

3. You can use a software called Varamozhi, This software allows text inputting in same transliteration scheme of Mozhi, and once you are done export it to unicode file. Download and install Varamozhi here. Visit varamozhi site for details on how to use it

4. You can use web based Google transliteration service , to type Malayalam in the transliteration scheme of Mozhi, and it will be converted to malayalam automatically, Then you can copy paste it into your programs.  Google transliteration service is also used in Orkut to input malayalam.
The advantage of this method is that you can test typing, right after you setup viewing.

Some more key mappers and web based services are listed here

Windows Vista

<to do>

GNU/Linux

GNOME and KDE both has good support for malayalam script rendering.

You will only need to install malayalam unicode font.

To install AnjaliOldLipi,
Download from here. To install, open your File Manager, type fonts:/// in the addressbar and hit enter and paste fonts in that folder.

OR you could install the distribution specific fonts by commands,
Redhat, Cent OS, RHEL , Fedora etc – yum install fonts-malayalam
Debian, Ubuntu etc – apt-get install ttf-malayam-fonts

Restart X-server by logging out and logging in back.

Usually Firefox is capable of detecting the malayalam font to display. If not,
Go to Tools > Options > Content.
You can see the Fonts & Colors section. Take Advanced.
Choose Malayalam from the Fonts for dropdown menu.
Now set AnjaliOldLipi in each of the dropdown list. Click Ok and Ok.

See firefox displaying malayalam in my Cent OS 5.3. The only error i could see is for the rendering of ‘nte’ as in “എന്റെ”

Malayalam wikipedia in Firefox in CentoOS

To type malayalam
1. Both GNOME and KDE has support for malayalam keyboard layout. The is the Inscript keyboard layout from CDAC, Govt of India.

To enable it,
For GNOME,
Go to System > Preferences > Keyboard. Select the Layouts tab.
Press Add, then select India > Malayalam from Available Layouts frame and then press Add. You could also see an image depicting the keymappings.

Now add a icon for changing keyboard layouts,
Right click on the main menu on your desktop and select Add to Panel….
Select Keyboard Indicator and click Add. Position the keyboard indicator on your menu bar and click it to switch between keyboard layouts.

For KDE,
In the Control Center, go to Regional & Accessibility, Keyboard Layout
In the tab Layout, click on Enable keyboard layouts
Choose the Malayalam in Available layouts and click on Apply
Now, you will have an icon for the KDE Keyboard Tool in your panel, in which you can choose the layout you want

2. You could also use the Google transliteration service. Check the section on ‘typing malayalam’ in Windows XP above for more details.

Mac

Mac OS X has no support for rendering Malayalam script at the time of writing. Mac OS X has support for only Devanagari, Gujarati and Gurmukhi scripts. So mac can properly display only the languages that use these scripts [like Hindi, Sanskrit, etc ]

We could still install the malayalam unicode fonts, and can get some readable display.
Download the font malayalam.ttf from here. [Mac needs its own specific truetype Unicode fonts to work with its font rendering engine AAT, So AnjaliOldLipi doesnot work here.]

Install the font by double clicking on it. Once the font is installed you will see ‘Malayalam’ in the System Preferences > International > Language list

Usually in Mac we do not need to change anything in Firefox or Safari to see malayalam. Mac is intelligent enough to  automatically hunt through your installed fonts to find any font that includes the character symbol.

Check this page with  firefox and safari.

See this screenshot of firefox displaying malayalam wikipedia page in Mac. You an see that its not good.
Malayalam wikipedia in Mac firefox

To type malayalam
1. The Google transliteration service can be used in mac too. Check the section on ‘typing malayalam’ in Windows XP above for more details.

2. For small texts, you could use the Mac’s unicode hex input, to directly input the keycode of the required letter.
Go to System Preferences > Keyboard and enable Unicode Hex Input checkbox. Now, a keyboard menu will appear on the menubar, Click on it choose Unicode Hex Input and press Option key and type the unicode code, and it will be inputted. Malayalam Unicode Hex chart can be downloaded here.

3. An experimental mac malayalam keyboard layout by Manoj is here. Download the the XML Layout file and install it as per the instructions given in the same page.

To view Manorama, Mathrubhumi and Deepika website.

Fonts used in the websites like Malayala-manorama and Deepika etc are not unicode, they are just usual ASCII encoded fonts which uses malayalam symbols at the places of English one’s. They use the code numbers assigned for English alphabets for Malayalam. This method does not have any of the features of Unicode fonts.

These sites use a technology of Internet Explorer called ‘Dynamic fonts’ where the font is automatically downloaded to your computer when you first visit their site in IE. Therefore, these sites by default, usually only work for IE.

Now, to view these sites in firefox or other browsers, you will have to manually download this font and install them. Refer previous sections on how to install a font for your operating system.

Manorama font – http://www.manoramaonline.com/mmfont/Manorama.ttf
Deepika font – http://www.deepika.com/mlkr0ntt_TTF.ttf

Mathrubhumi however uses Unicode font Meera hardcoded in to the HTML source. You will be able to view Mathrubhumi site after installing any unicode malayalam font.
If you want to install Meera font, download it at,
Mathurbhumi font – http://www.mathrubhumi.com/new09/Meera_04-2.ttf

Some More Malayalam Unicode fonts.

I have also collected some of the other Malayalam unicode fonts available. You could download them from here. Full credits to the creators of the font.Check the included copying.txt for information about the creators.

To have a look at how these fonts look, see this picture.

Some Issues

Webpage appears full of garbage even after installing font.
Try changing the encoding to UTF-8 from View > Character Encoding in FF and View > Encoding in IE

Credits-
Malayalam Computing, by Govt of Kerala. – This site include the latest on using malayalm in computers. Visit this site for further information on Computers and malayalam. Refer this site for details on how to use the Inscript keyboard.

Cibu and his Varamoshi page
Malayalam Wikipedia
Swathantra Malayalam computing
– for all the fonts.
MalayalamLinux
Project – for the mac font.
Santhosh – http://fci.wikia.com/wiki/SMC/Fonts – for the picture of fonts
Rohit and Sony for helping with the mac section and screenshots.

3 responses so far

Mounting the windows fat32 drive on startup for a normal user

This can be done by adding the line similar to the one shown below, to the end of the /etc/fstab.

/dev/sda6     /home/tony/win     vfat     defaults,uid=500,gid=500     0     0

This will automatically mount the fat32 drive/dev/sd6 to the directory /home/tony/win for the user with uid=500 in read/wite mode. Modify the /dev/sdax and /home/tony/win appropriately to reflect your setup.

The uid and gid of the user can be found by the command

[tony@localhost ~]$ id
uid=500(tony) gid=500(tony) groups=500(tony)

Before doing this take a backup of fstab by

[tony@localhost ~]$ su -
Password:
[root@localhost ~]# cp /etc/fstab /etc/fstab.bak

Now you can use gEdit to add the line

[root@localhost ~]# gedit /etc/fstab

Once we add the line, we could check the result of it immediately [without rebooting] by,

[root@localhost ~]# mount -a

Check whether we have the required result, if not modify the lines appropriately and recheck.

If a drive is mounted, you can unmount it, for any reason [perhaps to try another set of options] by,

[root@localhost ~]# umount /home/tony/Data/

A bit of info on how things work.

When a system boots the kernel reads the /etc/fstab and mounts the filesystems specified in it according to the list of options specified.
Each filesystem is described on a separate line. Fields on each line are separated by tabs or spaces.  Lines starting with ’#’ are comments.

The general form of the line is

device     directory     partition-type     mount-options     fs_freq     fs_passno

Lets see the possible values of these fields,
device – the partition as seen by linux
eg: /dev/sda5
/dev/sdb6
/dev/hda7

directory – the directory that will be the mount point
eg: /home/john/windows
/mnt/win

partition-type
eg: vfat
ntfs

mount-options – They are comma separated list of words which determine how the filesystem will be mounted. Some useful options are,
rw – read/write
ro – read only
auto – mounts automatically
noauto – not mounted automatically
exec – allows execution of binary files
noexec – no execution of binary
user – allows mounting by any user
users – allows mounting by any user but any other user can unmount.
sync – data written synchronously
async – data written asynchronously
uid=x,gid=x – Set the owner and group owner of the files (available only for some partition types)

defaults -rw,auto,exec,nouser,async

For full list and and more details on each of the options, check man mount.

fs_freq – This is used by  the dump command  to determine which filesystems need to be dumped. This field is 0 usually. Dump will assume that the filesystem does not need to be dumped.

fs_passno - This is used by the fsck program to determine the order in which filesystem checks are done at reboot time. It can be left 0. fsck will assume that the filesystem does not  need  to be checked.

Source
man mount
man fstab

No responses yet

Prevent gEdit from creating files that end with a tilde (~)

My home directory is full of files ending with tilde (~) created by gEdit. These are backup files created by gEdit when it modifies a file. We can set gEdit not to create backup files by going to Edit > Preferences > Editor and unchecking “Create backup copy before saving

To remove the all those backup files in one step you can try the script described here
http://dambalah.com/?s=gedit

No responses yet

Enabling mic to work on Cent OS 5 for Skype

It was not possible to get mic working in my Skype in CentOS 5.
I did a lot of play with the Gnome Volume Control. Tried changing the device from Alsamixer to OSS Mixer back and forth. Tried with all the settings inside skype voice settings.. Messed with the Gnome System > Preferences > Sound . etc etc.

But nothing seemed to work. And my mic was working perfectly in windows with skype, so it was sure that its not related to mic but something related to alsa or skype.

Now the solution,
Most probably, it is because our Mic is not set as the ‘Capturing device’ in alsa.

So first check, whether your mic and sound recording is working.

Alsa comes with a program to record voice. Plug in your mic and do a,
[tony@localhost ~]$ arecord -vv -d 10 test.wav
speak something and it should get recorded. the -vv option shows a VU meter of your recording sound.

Now try to play it,
[tony@localhost ~]$ aplay -vv test.wav

If you hear it back, then your mic is properly working and sound recording is fine.
Then it should be a problem with Skype.

If not, as in the case with me, You will need to mess with alsamixer.
Start alsamixer in a new terminal
[tony@localhost ~]$ alsamixer

Press tab to go to ‘Capture’, This will list all the capture related stuffs. Pressing tab cycles between view modes like Playback, Capture and All.

Now, there will be items like Mic, Mic boost, Capture, Line, CD, Digital, Aux etc etc. Some of these devices will have a text called Capture written in red at the bottom of the volume bar. This is called Capture flag and this enables the recording on the device. .
Make sure you have Capture flag set on the devices Capture, and Mic. You could do this selecting the correct item(by Left/Right arrow keys] and by pressing space. When i checked mine it was incorrectly set on ‘Line’ only.

Also make sure you have max volume in in Mic boost, Capture and Digital. [Check the screenshot]

Capture settings in alsamixer

Now try recording, again.

If things work you could adjust the volume levels properly.
Also to can mute your mic so that sound is not produced by your speakers when you use Mic. Do this by going back to Playback [by pressing tab again] and selecting Mic and by pressing ‘m’. You will see a ‘MM’ if a device is muted and ‘00′ if its not. [check the screen shot]

Alsa mic muted

Take skype back and do the test call again to see f there is any change. :)

You can find more info at,
http://www.alsa-project.org/main/index.php/SoundcardTesting

3 responses so far

Yahoo! India Small Business web hosting review

33dots.com is my first website and i do not have much knowledge about web hosting providers. Anyway, i list here some of my observations on Yahoo! Small Business where this site is hosted

Technical specifications
Free domain name.
PHP 4.3 / PERL 5.8 / MySQL 4.1
1000 POP / SMTP emails.
1000 FTP accounts (for website management)
1000 sub-domains
Hourly/Daily/Weekly automated backups
Rs 1999/ year.

Some of the interesting features of the service are,
Unlimited space
You are given a 5GB space initially and this can be increased free of cost upon request. So you will never run out of space.

Unlimited data transfer
That’s good considering the reasonable price.

1000 email id’s
The SMTP emails given are in the same yahoo mail interface, which is one of the best webmails in the world.

Yahoo! brand name and expertise
We can expect that the site is hosted in the yahoo servers and so it should be secure, reliable and has a high uptime.
Yes! Its also a matter of pride to feel that our site is hosted in Yahoo!

 
However here comes the problems,

No .htaccess support.
Yahoo do not allow .htaccess files. We cannot upload/create any file beginning with a .(dot) .This is a real problem as most of the CMS and BB systems requires them.
In my case i was not able to use wordpress pretty permalinks because of this. :(

Only one database user.
This appears to be a crazy. We are only allowed one database user. If we try to create a user via their administration panel or through phpMyAdmin, it says no permission.
Strangely, i found out that it is possible to insert/edit the user table in the database.

Poor control panel
The web administration software offered by yahoo is not upto the mark. It looks outdated. Most of the functions are not intuitive and appear confusing. Also many steps are required to do for even simple tasks. It comes no where near to cPanel, plesk etc.
There is no facility to install any of the common PHP applications. (CMS’s, blogs, forums, etc etc)
The only software that can be installed from the web administration panel is phpMyAdmin 2.6
For every other thing you need to upload via FTP.

No shell support. No cron. No access to php.ini.

The web statistics page is not good. They provide an additional access log and you have to use your own statistics program to import and view them.

I am not so impressed with their customer support. For my email to them on why i cant upload .htaccess files, i got a reply 2 days later, they asked me courteously to
“dial 99001xxxxx and press option” 1″ for YSB and “1″ again for existing
customer between 9:00 AM to 6:00 PM (Mon to Sat)”

 
As the word ’small’ in their name, Yahoo! Small Business is perfect for small websites with a set of static HTML pages.
But for some serious business, may be even for blogging, you have to think twice…

No responses yet

Next »