2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
21 typedef unsigned short int Uchar;
29 Encoding(string const & n, string const & l, Uchar const * e)
30 : Name_(n), LatexName_(l) {
31 for (int i = 0; i < 256; ++i)
32 encoding_table[i] = e[i];
35 string const & Name() const {
39 string const & LatexName() const {
43 Uchar ucs(unsigned char c) const {
44 return encoding_table[c];
52 Uchar encoding_table[256];
55 extern Encoding symbol_encoding;
60 typedef std::map<string, Encoding> EncodingList;
64 void read(string const & filename);
66 Encoding const * getEncoding(string const & encoding) const;
68 Encoding const * symbol_encoding() {
69 return &symbol_encoding_;
85 bool IsComposeChar_hebrew(unsigned char c);
88 bool IsComposeChar_arabic(unsigned char c);
91 bool is_arabic_special(unsigned char c);
94 bool is_arabic(unsigned char c);
97 unsigned char TransformChar(unsigned char c, Letter_Form form);
101 EncodingList encodinglist;
103 Encoding symbol_encoding_;
106 extern Encodings encodings;