Here is code to add Chinese and Japanese character encodings. Find the file koEncodingServices.py in the Komodo installation, and add the following at line 102.
koEncodingHierarchyCategory( 'Asia', [ ('gb18030', "Simplified Chinese (GB18030)", 'GB18030', '', 1,'gb18030'), ('gb2312', "Simplified Chinese (GB2312-1980)", 'GB2312-1980', '', 1,'gb2312'), ('hz', 'Simplified Chinese (Hz)', 'Hz', '', 1,'hz'), ('big5', 'Traditional Chinese (Big5)', 'Big5', '', 1,'big5'), ('cp950', 'Traditional Chinese (Microsoft CP-950)', 'CP950', '', 1,'cp950'), ('big5hkscs', 'Traditional Chinese (HKSCS)', 'HKSCS', '', 1,'big5hkscs'), ('shift_jis', 'Shift JIS', 'Shift JIS', '', 1,'shift_jis'), ('shift_jis_2004', 'Shift JIS 2004', 'Shift JIS 2004', '', 1,'shift_jis_2004'), ('shift_jisx0213', 'Shift JIS X 0208', 'Shift JIS X 0208', '', 1,'shift_jisx0213'), ('cp932', 'Shift JIS (CP-932)', 'CP932', '', 1,'cp932'), ('gbk', 'GBK (CP-936/GBK)', 'CP936/GBK', '', 1,'gbk'), ] ),
koEncodingHierarchyCategory(
'Asia',
[
('gb18030', "Simplified Chinese (GB18030)", 'GB18030', '', 1,'gb18030'),
('gb2312', "Simplified Chinese (GB2312-1980)", 'GB2312-1980', '', 1,'gb2312'),
('hz', 'Simplified Chinese (Hz)', 'Hz', '', 1,'hz'),
('big5', 'Traditional Chinese (Big5)', 'Big5', '', 1,'big5'),
('cp950', 'Traditional Chinese (Microsoft CP-950)', 'CP950', '', 1,'cp950'),
('big5hkscs', 'Traditional Chinese (HKSCS)', 'HKSCS', '', 1,'big5hkscs'),
('shift_jis', 'Shift JIS', 'Shift JIS', '', 1,'shift_jis'),
('shift_jis_2004', 'Shift JIS 2004', 'Shift JIS 2004', '', 1,'shift_jis_2004'),
('shift_jisx0213', 'Shift JIS X 0208', 'Shift JIS X 0208', '', 1,'shift_jisx0213'),
('cp932', 'Shift JIS (CP-932)', 'CP932', '', 1,'cp932'),
('gbk', 'GBK (CP-936/GBK)', 'CP936/GBK', '', 1,'gbk'),
]
),
I haven't tested that stuff, if you can, would you post your results? (ie. if it works or not for you). We never added these encodings because we have no reliable way of testing them.
Just that it seems Komodo remembers which encoding I used last time when I opened a certain file. I had to close the app, remove "doc-state.xmlc" located in %appdata%\ActiveState\KomodoIDE\4.2 (Windows), and then open the app to make it work for recently opened files. Not a big deal tho.
Here is code to add Chinese and Japanese character encodings. Find the file koEncodingServices.py in the Komodo installation, and add the following at line 102.
'Asia',
[
('gb18030', "Simplified Chinese (GB18030)", 'GB18030', '', 1,'gb18030'),
('gb2312', "Simplified Chinese (GB2312-1980)", 'GB2312-1980', '', 1,'gb2312'),
('hz', 'Simplified Chinese (Hz)', 'Hz', '', 1,'hz'),
('big5', 'Traditional Chinese (Big5)', 'Big5', '', 1,'big5'),
('cp950', 'Traditional Chinese (Microsoft CP-950)', 'CP950', '', 1,'cp950'),
('big5hkscs', 'Traditional Chinese (HKSCS)', 'HKSCS', '', 1,'big5hkscs'),
('shift_jis', 'Shift JIS', 'Shift JIS', '', 1,'shift_jis'),
('shift_jis_2004', 'Shift JIS 2004', 'Shift JIS 2004', '', 1,'shift_jis_2004'),
('shift_jisx0213', 'Shift JIS X 0208', 'Shift JIS X 0208', '', 1,'shift_jisx0213'),
('cp932', 'Shift JIS (CP-932)', 'CP932', '', 1,'cp932'),
('gbk', 'GBK (CP-936/GBK)', 'CP936/GBK', '', 1,'gbk'),
]
),
koEncodingHierarchyCategory( 'Asia', [ ('gb18030', "Simplified Chinese (GB18030)", 'GB18030', '', 1,'gb18030'), ('gb2312', "Simplified Chinese (GB2312-1980)", 'GB2312-1980', '', 1,'gb2312'), ('hz', 'Simplified Chinese (Hz)', 'Hz', '', 1,'hz'), ('big5', 'Traditional Chinese (Big5)', 'Big5', '', 1,'big5'), ('cp950', 'Traditional Chinese (Microsoft CP-950)', 'CP950', '', 1,'cp950'), ('big5hkscs', 'Traditional Chinese (HKSCS)', 'HKSCS', '', 1,'big5hkscs'), ('shift_jis', 'Shift JIS', 'Shift JIS', '', 1,'shift_jis'), ('shift_jis_2004', 'Shift JIS 2004', 'Shift JIS 2004', '', 1,'shift_jis_2004'), ('shift_jisx0213', 'Shift JIS X 0208', 'Shift JIS X 0208', '', 1,'shift_jisx0213'), ('cp932', 'Shift JIS (CP-932)', 'CP932', '', 1,'cp932'), ('gbk', 'GBK (CP-936/GBK)', 'CP936/GBK', '', 1,'gbk'), ] ),I haven't tested that stuff, if you can, would you post your results? (ie. if it works or not for you). We never added these encodings because we have no reliable way of testing them.
Hi shanec,
Thank you, it's working.
Just that it seems Komodo remembers which encoding I used last time when I opened a certain file. I had to close the app, remove "doc-state.xmlc" located in %appdata%\ActiveState\KomodoIDE\4.2 (Windows), and then open the app to make it work for recently opened files. Not a big deal tho.
Steven
I've added this in Change 281134