[PATCH] hd44780-charmap.h imon.c Russian charmaps
Yura Scheglyuk <[email protected]>
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
Hi! I made the new version of two additional Russian charmaps - CP-1251 (Windows-1251) and ISO 8859-5 according principle of previous patch of koi8-r charmap. I removed pseudo-graphics symbols because it's rarely used and remapping symbols like HEART and so on. Markus, could you please commit this patch? If you'll approve this patch all Russian users will say you "SPASIBO!". There are a lot of lcdproc clients like XBMC, VDRs etc. For example, CP1251 used in XBMC and XBMC does not contains KOI8-R translation; ISO-8859-5 used in XBMC and some VDR packages - russian EPG comes from satellites in ISO-8859-5 charset. Now users have to patch ALL software projecs to map international charmaps to VFD charmaps. Therefore I think that adding mapping of input characters in ONE lcdproc project is the best way to get international (not only russian but Cyrillic at all - Ukrainian, Belorussian, Bulgarian, etc.) users support. In this case lcdproc will have complete Russian solution "out of the box" and this can lead to wide growing of UNIX popularization among users. -- Best regards, Yura Scheglyuk. _______________________________________________ LCDproc mailing list [email protected] http://lists.omnipotent.net/mailman/listinfo/lcdproc
hd44780-imon.russian.patch
(text/plain, 9.9 KB)
--- LCDd.conf.orig 2011-02-11 05:07:04.000000000 +0600
+++ LCDd.conf 2011-03-27 17:46:05.667962636 +0700
@@ -502,7 +502,8 @@
# Character map to to map ISO-8859-1 to the LCD's character set
# [default: hd44780_default; legal: hd44780_default, hd44780_euro,
-# ea_ks0073, sed1278f_0b, hd44780_koi8_r, upd16314 ]
+# ea_ks0073, sed1278f_0b, hd44780_koi8_r, hd44780_cp1251, hd44780_8859_5,
+# upd16314 ]
CharMap=hd44780_default
# If your display is slow and cannot keep up with the flow of data from
@@ -574,7 +575,8 @@
Size=16x2
# Character map to to map ISO-8859-1 to the displays character set.
-# [default: none; legal: none, hd44780_euro, upd16314, hd44780_koi8_r]
+# [default: none; legal: none, hd44780_euro, upd16314,
+# hd44780_koi8_r, hd44780_cp1251, hd44780_8859_5,]
CharMap=hd44780_euro
## Soundgraph iMON LCD ##
--- docs/lcdproc-user/driversh/d44780.docbook.orig 2011-02-11 05:07:04.000000000 +0600
+++ docs/lcdproc-user/driversh/hd44780.docbook 2011-03-27 17:51:57.000000000 +0700
@@ -2853,6 +2853,8 @@
<parameter><literal>ea_ks0073</literal></parameter> |
<parameter><literal>sed12780f_0b</literal></parameter> |
<parameter><literal>hd44780_koi8_r</literal></parameter> |
+ <parameter><literal>hd44780_cp1251</literal></parameter> |
+ <parameter><literal>hd44780_8859_5</literal></parameter> |
<parameter><literal>upd16314</literal></parameter> |
<parameter><literal>none</literal></parameter>
}
@@ -2883,6 +2885,16 @@
charset (ROM code A02).
</para></listitem>
<listitem><para>
+ <literal>hd44780_cp1251</literal> maps input from a client in
+ Russian CP1251 (Windows-1251) to displays with a ROM mask supporting
+ the european charset (ROM code A02).
+ </para></listitem>
+ <listitem><para>
+ <literal>hd44780_8859_5</literal> maps input from a client in
+ Russian ISO 8859-5 to displays with a ROM mask supporting the european
+ charset (ROM code A02).
+ </para></listitem>
+ <listitem><para>
<literal>upd16314</literal> is for displays with a Nec uPD16314
vacuum fluorescent display (VFD) controller with ROM code 002
character set. If your display has ROM code 001 character set you
--- docs/lcdproc-user/driversh/imon.docbook.orig 2011-03-23 13:04:04.000000000 +0600
+++ docs/lcdproc-user/driversh/imon.docbook 2011-03-27 17:53:37.000000000 +0700
@@ -84,6 +84,8 @@
{
<emphasis><parameter><literal>hd44780_euro</literal></parameter></emphasis> |
<parameter><literal>hd44780_koi8_r</literal></parameter> |
+ <parameter><literal>hd44780_cp1251</literal></parameter> |
+ <parameter><literal>hd44780_8859_5</literal></parameter> |
<parameter><literal>upd16314</literal></parameter> |
<parameter><literal>none</literal></parameter>
}
@@ -101,6 +103,16 @@
charset (ROM code A02).
</para></listitem>
<listitem><para>
+ <literal>hd44780_cp1251</literal> maps input from a client in
+ Russian CP1251 (Windows-1251) to displays with a ROM mask supporting
+ the european charset (ROM code A02).
+ </para></listitem>
+ <listitem><para>
+ <literal>hd44780_8859_5</literal> maps input from a client in
+ Russian ISO 8859-5 to displays with a ROM mask supporting the european
+ charset (ROM code A02).
+ </para></listitem>
+ <listitem><para>
<literal>upd16314</literal> is for displays with a Nec uPD16314
vacuum fluorescent display (VFD) controller with ROM code 002
character set. If your display has ROM code 001 character set you
--- server/drivers/hd44780-charmap.h.orig 2011-03-23 13:04:04.000000000 +0600
+++ server/drivers/hd44780-charmap.h 2011-03-27 17:37:45.000000000 +0700
@@ -329,6 +329,104 @@
};
/*
+ * Table for HD44780 controller with ROM mask supporting
+ * the european charset (ROM code A02).
+ *
+ * Russian CP-1251 codepage as input
+ */
+const unsigned char HD44780_CP1251_charmap[] = {
+ /* #0 */
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31,
+ /* #32 */
+ 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63,
+ /* #64 */
+ 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 47, 93, 94, 95,
+ /* #96 */
+ 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127,
+ /* #128 */
+ 141, 146, 44, 146, 34, 95, 43, 35, /* Ђ Ѓ ‚ ѓ „ … † ‡ */
+ 158, 37, 134, 60, 72, 75, 72, 137, /* € ‰ Љ ‹ Њ Ќ Ћ Џ */
+ 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 84, 156, 62, 156, 157, 158, 159, /* ™ › */
+ /* #160 */
+ 160, 161, 162, 163, 164, 165, 124, 167, /* ¤ ¦ § */
+ 203, 169, 69, 171, 32, 32, 174, 207, /* Ё © Є « ® Ї */
+ 176, 177, 178, 179, 180, 181, 182, 183, /* ° ± µ ¶ · */
+ 203, 78, 69, 187, 188, 189, 190, 207, /* ё № є » ї */
+ /* #192 */
+ 65, 128, 66, 146, 129, 69, 130, 131, /* А Б В Г Д Е Ж З */
+ 132, 133, 75, 134, 77, 72, 79, 135, /* И Й К Л М Н О П */
+ 80, 67, 84, 136, 216, 88, 137, 138, /* Р С Т У Ф Х Ц Ч */
+ 139, 140, 141, 142, 98, 143, 172, 173, /* Ш Щ Ъ Ы Ь Э Ю Я */
+ /* #224 */
+ 65, 128, 66, 146, 129, 69, 130, 131, /* а б в г д е ж з */
+ 132, 133, 75, 134, 77, 72, 79, 135, /* и й к л м н о п */
+ 80, 67, 84, 136, 216, 88, 137, 138, /* р с т у ф х ц ч */
+ 139, 140, 141, 142, 98, 143, 172, 173 /* ш щ ъ ы ь э ю я */
+};
+
+/*
+ * Table for HD44780 controller with ROM mask supporting
+ * the european charset (ROM code A02).
+ *
+ * Russian ISO 8859-5 codepage as input
+ */
+const unsigned char HD44780_ISO_8859_5_charmap[] = {
+ /* #0 */
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31,
+ /* #32 */
+ 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63,
+ /* #64 */
+ 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 47, 93, 94, 95,
+ /* #96 */
+ 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127,
+ /* #128 */
+ 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159,
+ /* #160 */
+ 160, 203, 162, 163, 164, 165, 166, 167, /* Ё */
+ 168, 169, 170, 171, 172, 173, 174, 175,
+ 65, 128, 66, 146, 129, 69, 130, 131, /* А Б В Г Д Е Ж З */
+ 132, 133, 75, 134, 77, 72, 79, 135, /* И Й К Л М Н О П */
+ /* #192 */
+ 80, 67, 84, 136, 216, 88, 137, 138, /* Р С Т У Ф Х Ц Ч */
+ 139, 140, 141, 142, 98, 143, 172, 173, /* Ш Щ Ъ Ы Ь Э Ю Я */
+ 65, 128, 66, 146, 129, 69, 130, 131, /* а б в г д е ж з */
+ 132, 133, 75, 134, 77, 72, 79, 135, /* и й к л м н о п */
+ /* #224 */
+ 80, 67, 84, 136, 216, 88, 137, 138, /* р с т у ф х ц ч */
+ 139, 140, 141, 142, 98, 143, 172, 173, /* ш щ ъ ы ь э ю я */
+ 78, 203, 242, 243, 244, 245, 246, 247, /* № ё */
+ 248, 249, 250, 251, 252, 167, 254, 255 /* § */
+};
+
+/*
* Mapping table for NEC µ PD16314 controller. This is a VFD controller
* that understands the same command set as HD44780 driver and comes with (at
* least) one of two character sets in ROM:
@@ -390,13 +488,15 @@
/** List of available character mappings. This list is sorted by relevance! */
const struct charmap available_charmaps[] = {
- { "hd44780_default", HD44780_charmap },
- { "hd44780_euro", HD44780_euro_charmap },
- { "hd44780_koi8_r", HD44780_KOI8R_charmap},
- { "ea_ks0073", EA_KS0073_charmap },
- { "sed1278f_0b", SED1278F_0B_charmap },
- { "upd16314", uPD16314_charmap },
- { "none", none_charmap }
+ { "hd44780_default", HD44780_charmap },
+ { "hd44780_euro", HD44780_euro_charmap },
+ { "hd44780_koi8_r", HD44780_KOI8R_charmap },
+ { "hd44780_cp1251", HD44780_CP1251_charmap },
+ { "hd44780_8859_5", HD44780_ISO_8859_5_charmap},
+ { "ea_ks0073", EA_KS0073_charmap },
+ { "sed1278f_0b", SED1278F_0B_charmap },
+ { "upd16314", uPD16314_charmap },
+ { "none", none_charmap }
};
/**
--- server/drivers/imon.c.orig 2011-03-27 17:10:34.000000000 +0700
+++ server/drivers/imon.c 2011-03-27 17:21:29.219934833 +0700
@@ -117,6 +117,8 @@
"none",
"hd44780_euro",
"hd44780_koi8_r",
+ "hd44780_cp1251",
+ "hd44780_8859_5",
"upd16314",
NULL
};