ueno/libskk — Issue #3: ";; okuri-ari/nasi entries" comments shouldn't be required in CDB files
Author: tamo
Created: 2011-12-27 13:30:25+00:00
State: open

I'm using a CDB jisyo file with no comments.
It seems that ibus-skk doesn't work with the jisyo file.

"make check" fails at file-dict if you define LIBSKK_FILE_DICT=\"the_cdb_jisyo.cdb\"

gmake[1]: Entering directory `/home/tamo/libskk-0.0.4/tests'
/libskk/rom-kana: OK
PASS: rom-kana
/libskk/file-dict:
** WARNING **: file-dict.vala:114: error loading file dictionary /home/tamo/libskk-0.0.4/tests/file-dict.cdb no okuri-ari boundary
Trace/BPT trap (core dumped)
FAIL: file-dict

I don't think "okuri-ari" or "okuri-nashi" comments are required, especially in CDB files.

Here is what I used to make the CDB jisyo file:

#! /usr/bin/env python
import string
import cdb

oj = open('SKK-JISYO.L', 'r')

fn = 'SKK-JISYO.L.cdb'
maker = cdb.cdbmake(fn, fn + '.tmp');

line = oj.readline()
while line:
if line[0] == ';':
line = oj.readline()
continue
sp = line.find(' ')
if sp == -1:
line = oj.readline()
continue
key = line[0:sp]
data = line[sp+1:-1]
maker.add(key, data)
#print "%s --> %s" % (key, data)
line = oj.readline()

oj.close
print "%d records in %s" % \
(maker.numentries, maker.fn)

maker.finish()