diff --git a/ChangeLog b/ChangeLog
index cbbce6a..89b5bc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@ v.0.5dev (ongoing development)
* hd44780/ethlcd: fix LCDd hang up on network error (exits now) (M. Bialonczyk)
+ New common 5x8 font for t6963, sed1520, mdm166a and i2500vfd
* t6963: Size has now to be configured in pixels instead of characters
+ + Build system: --enable-extra-charmaps option adds language specific charmaps
v0.5.4
* Update driver includes and LDFLAGS (fixed glk and bayrad binding error)
diff --git a/LCDd.conf b/LCDd.conf
index 8cf8f42..5ed414a 100644
--- a/LCDd.conf
+++ b/LCDd.conf
@@ -501,8 +501,9 @@ Size=20x4
#LineAddress=0x10
# 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 ]
+# [default: hd44780_default; legal: hd44780_default, hd44780_euro, ea_ks0073,
+# sed1278f_0b, (hd44780_koi8_r, hd44780_cp1251, hd44780_8859_5, upd16314 if
+# compiled with additional charmaps)]
CharMap=hd44780_default
# If your display is slow and cannot keep up with the flow of data from
@@ -574,7 +575,8 @@ Device=/dev/lcd0
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 if compiled with additional charmaps)]
CharMap=hd44780_euro
## Soundgraph iMON LCD ##
diff --git a/configure.in b/configure.in
index aa932a4..cd7055e 100644
--- a/configure.in
+++ b/configure.in
@@ -39,7 +39,7 @@ AC_DEFINE_UNQUOTED([SYSTEM_HOST], [$ac_system_host], [Set this to your system ho
dnl treat Darwin special in Makefiles
AM_CONDITIONAL(DARWIN, test x$ac_system_host = xDarwin)
-AC_MSG_CHECKING(whether to enable debugging)
+AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug], [show debug information])],
[ if test "$enableval" != "no"; then
@@ -93,7 +93,7 @@ AC_CHECK_HEADERS(procfs.h sys/procfs.h sys/loadavg.h utmpx.h)
dnl Some versions of Solaris require -lelf for -lkvm
AC_CHECK_LIB(kvm, kvm_open,[
LIBS="-lkvm $LIBS"
-],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
+],[AC_MSG_CHECKING([for kvm_open in -lkvm with -lelf])
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
[ac_save_LIBS="$LIBS"
LIBS="-lkvm -lelf $LIBS"
@@ -158,7 +158,7 @@ if test "$ac_cv_port_have_lpt" = yes; then
AC_DEFINE([HAVE_PCSTYLE_LPT_CONTROL], [1],
[Define if you have a parallel port and LCDproc knows how to talk to it.])
else
- AC_MSG_WARN([Can't talk to the parallel port, disabling drivers that use it.])
+ AC_MSG_WARN([Cannot talk to the parallel port, disabling drivers that use it.])
fi
x_ac_have_i2c=no
@@ -412,6 +412,15 @@ AC_ARG_ENABLE(stat-smbfs,
fi ]
)
+AC_ARG_ENABLE(extra-charmaps,
+ [AS_HELP_STRING([--enable-extra-charmaps],
+ [enable additional character mapping tables in drivers])],
+ [ if test "$enableval" != "no" ; then
+ AC_DEFINE(EXTRA_CHARMAPS, [1],
+ [Define to 1 to enable additional charmaps in drivers])
+ fi ]
+)
+
AC_CONFIG_FILES([Makefile
shared/Makefile
diff --git a/docs/lcdproc-user/drivers/hd44780.docbook b/docs/lcdproc-user/drivers/hd44780.docbook
index decf21e..6ef9116 100644
--- a/docs/lcdproc-user/drivers/hd44780.docbook
+++ b/docs/lcdproc-user/drivers/hd44780.docbook
@@ -2853,11 +2853,14 @@ This can be done by specifying or by inclu
ea_ks0073 |
sed12780f_0b |
hd44780_koi8_r |
+ hd44780_cp1251 |
+ hd44780_8859_5 |
upd16314 |
none
}
-
+
+
Set the character mapping depending on the display you have:
@@ -2877,17 +2880,6 @@ This can be done by specifying or by inclu
sed12780f_0b is for some SED 1278 displays.
-
- hd44780_koi8_r maps input from a client in
- Russian KOI8-R to displays with a ROM mask supporting the european
- charset (ROM code A02).
-
-
- upd16314 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
- may use the hd44780_euro charmap instead.
-
The none charmap does not translate any characters.
It displays the characters the display controllers actually has
@@ -2897,15 +2889,42 @@ This can be done by specifying or by inclu
You only need to set this parameter if you have a non-standard
HD44780 display or charmap.
-
-
-
- See server/drivers/hd44780-charset.h
- in LCDproc's source directory for the actual
- mappings.
-
-
-
+
+
+ If LCDproc was configured with '--enable-extra-charmaps' option the
+ following character mappings are available, too:
+
+
+ hd44780_koi8_r maps input from a client in
+ Russian KOI8-R to displays with a ROM mask supporting the european
+ charset (ROM code A02).
+
+
+ hd44780_cp1251 maps input from a client in
+ Russian CP1251 (Windows-1251) to displays with a ROM mask supporting
+ the european charset (ROM code A02).
+
+
+ hd44780_8859_5 maps input from a client in
+ Russian ISO 8859-5 to displays with a ROM mask supporting the european
+ charset (ROM code A02).
+
+
+ upd16314 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
+ may use the hd44780_euro charmap instead.
+
+
+
+
+
+ See server/drivers/hd44780-charset.h
+ in LCDproc's source directory for the actual
+ mappings.
+
+
+
diff --git a/docs/lcdproc-user/drivers/imon.docbook b/docs/lcdproc-user/drivers/imon.docbook
index 7e03867..f658d76 100644
--- a/docs/lcdproc-user/drivers/imon.docbook
+++ b/docs/lcdproc-user/drivers/imon.docbook
@@ -84,45 +84,62 @@ For further details, please consult the page and the forum at
{
hd44780_euro |
hd44780_koi8_r |
+ hd44780_cp1251 |
+ hd44780_8859_5 |
upd16314 |
none
}
-
+
+
Set the character mapping depending on the display you have:
The default, hd44780_euro is for displays with
a ROM mask supporting the european charset (ROM code A02).
+
+ The none charmap does not translate any characters
+ and is only useful for debugging.
+
+
+ You only need to set this parameter if you have a non-standard charmap.
+
+
+ If LCDproc was configured with '--enable-extra-charmaps' option the
+ following character mappings are available, too:
+
hd44780_koi8_r maps input from a client in
Russian KOI8-R to displays with a ROM mask supporting the european
charset (ROM code A02).
+
+ hd44780_cp1251 maps input from a client in
+ Russian CP1251 (Windows-1251) to displays with a ROM mask supporting
+ the european charset (ROM code A02).
+
+
+ hd44780_8859_5 maps input from a client in
+ Russian ISO 8859-5 to displays with a ROM mask supporting the european
+ charset (ROM code A02).
+
upd16314 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
may use the hd44780_euro charmap instead.
-
- The none charmap does not translate any characters.
- It displays the characters the display controllers actually has
- stored in its CGROM for that position instead. This setting is
- intended for debugging purpose.
-
- You only need to set this parameter if you have a non-standard charmap.
-
-
-
- See server/drivers/hd44780-charset.h
- in LCDproc's source directory for the actual
- mappings.
-
-
-
+
+
+
+ See server/drivers/hd44780-charset.h
+ in LCDproc's source directory for the actual
+ mappings.
+
+
+
diff --git a/server/drivers/hd44780-charmap.h b/server/drivers/hd44780-charmap.h
index d794f76..1df351e 100644
--- a/server/drivers/hd44780-charmap.h
+++ b/server/drivers/hd44780-charmap.h
@@ -279,6 +279,7 @@ const unsigned char SED1278F_0B_charmap[] = {
175, 151, 163, 150, 129, 121, 32, 253
};
+#ifdef EXTRA_CHARMAPS
/*
* Table for HD44780 controller with ROM mask supporting
* the european charset (ROM code A02).
@@ -328,6 +329,104 @@ const unsigned char HD44780_KOI8R_charmap[] = {
98, 142, 131, 139, 143, 140, 138, 141 /* Ь Ы З Ш Э Щ Ч Ъ */
};
+/*
+ * 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
@@ -380,6 +479,7 @@ const unsigned char uPD16314_charmap[] = {
111, 238, 111, 111, 111, 111, 135, 253,
137, 117, 117, 117, 139, 121, 240, 255
};
+#endif /* EXTRA_CHARMAPS */
#define MAX_CHARMAP_NAME_LENGTH 16
@@ -390,13 +490,18 @@ struct charmap {
/** 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 },
+ { "ea_ks0073", EA_KS0073_charmap },
+ { "sed1278f_0b", SED1278F_0B_charmap },
+#ifdef EXTRA_CHARMAPS
+ { "hd44780_koi8_r", HD44780_KOI8R_charmap },
+ { "hd44780_cp1251", HD44780_CP1251_charmap },
+ { "hd44780_8859_5", HD44780_ISO_8859_5_charmap},
+ { "upd16314", uPD16314_charmap },
+#endif
+ /* This is the last entry. */
+ { "none", none_charmap }
};
/**
diff --git a/server/drivers/imon.c b/server/drivers/imon.c
index ee7b91b..10d8c9d 100644
--- a/server/drivers/imon.c
+++ b/server/drivers/imon.c
@@ -115,8 +115,12 @@ typedef struct imon_private_data {
static char * imon_charmaps[] = {
"none",
"hd44780_euro",
+#ifdef EXTRA_CHARMAPS
"hd44780_koi8_r",
+ "hd44780_cp1251",
+ "hd44780_8859_5",
"upd16314",
+#endif
NULL
};