8 #include "support/filetools.h"
13 CharacterSet::CharacterSet()
19 CharacterSet::~CharacterSet()
25 void CharacterSet::freeMap()
38 bool CharacterSet::loadFile(const string& fname)
42 if (fname.empty() || fname=="ascii")
43 return true; // ascii 7-bit
45 // open definition file
47 << "Opening keymap file " << fname << ".cdef" << endl;
48 string filename = LibFileSearch("kbd", fname.c_str(), "cdef");
49 FilePtr f(filename, FilePtr::read);
50 if (filename.empty() || !f()) {
51 lyxerr << "Unable to open keymap file" << endl;
52 return true; // no definition, use 7-bit ascii
65 while(lex.IsOK() && !error) {
68 case LyXLex::LEX_FEOF :
69 lyxerr[Debug::KBMAP] << "End of parsing of .cdef file"
90 if (lyxerr.debugging(Debug::KBMAP))
91 lyxerr << "Chardef: " << n
92 << " to [" << tempc->str << "]" << endl;
101 bool CharacterSet::encodeString(string & str)
107 // Can this fail? Why is ic an unsigned char?
117 string CharacterSet::getName()