Thursday, May 31, 2007

Komodo - Japanese Encodings


If you are considering Komodo Edit as editor and you work for a Japanese company you should be aware that the default installation of Komodo does not support Japanese text encodings like cp932 (Windows), EUC-JP and Shift-JIS.


Fortunately by modifying some configuration files we can make Komodo Edit to recognize and render these text encodings correctly (ref1 and ref2). The configuration file you need to modify is called "koEncodingServices.py" and the location depends on the OS you are using:



In Mac the file is located in

Komodo IDE.app/Conten­ts/MacOS/compo­nents/koEncodin­gServices.py

In Linux and Windows the file is located in

${INSTALL_DIR}/lib/mozilla/components/koEncodin­gServices.py

Change ${INSTALL_DIR} with the root path were you installed Komodo Edit in you machine.



Close Komodo Edit and using you next favorite text editor open the file and in line 81 add the following three lines (see screenshot):


('EUC-JP', 'EUC-JP', 'EUC-JP', '', 1, 'EUC-JP'),
('Shift_JIS', 'Shift_JIS', 'Shift_JIS', '', 1, 'Shift_JIS'),
('cp932', 'Japanese (cp932)', 'CP932', '', 1,'cp932'),

Impressions

The only thing I liked about it is the ability to make it feel like Vim using some key bindings with project management enhancements. This only reason was not good enough to make me switch and soon I was back to my Command Prompt + Vim + muCommander in Windows and yakuake + Vim + Konqueror in Linux.


Komodo felt too cluttered and was way too slow to start and edit with specially on Linux. Finally if you decide to use Komodo Edit for any reason you may as well change the default fonts as they are not too good for programming tasks. You can find the best fonts for programming here. From the list my favorites are the Bistream Vera Sans Mono and Dina Fonts that look rather good on Linux and on Windows as well.