I use gedit in Ubuntu, and Swanalekha input scheme to type Malayalam. When I switch to Malayalam input (iBus) and type "kOzhikkkOt, I get കോഴിക്കോട് on the screen. In XeLaTeX, I use Rachana fonts and the glyphs appear correctly in the PDF output also.