2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
23 typedef unsigned short int Uchar;
31 Encoding(string const & n, string const & l, Uchar const * e)
32 : Name_(n), LatexName_(l) {
33 for (int i = 0; i < 256; ++i)
34 encoding_table[i] = e[i];
37 string const & Name() const {
41 string const & LatexName() const {
45 Uchar ucs(unsigned char c) const {
46 return encoding_table[c];
54 Uchar encoding_table[256];
57 extern Encoding symbol_encoding;
62 typedef std::map<string, Encoding> EncodingList;
66 void read(string const & filename);
68 Encoding const * getEncoding(string const & encoding) const;
70 Encoding const * symbol_encoding() {
71 return &symbol_encoding_;
87 bool IsComposeChar_hebrew(unsigned char c);
90 bool IsComposeChar_arabic(unsigned char c);
93 bool is_arabic(unsigned char c);
96 unsigned char TransformChar(unsigned char c, Letter_Form form);
100 EncodingList encodinglist;
102 Encoding symbol_encoding_;
105 extern Encodings encodings;