aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2005-12-18 23:07:04 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2005-12-18 23:07:04 -0500
commit01876e39ab4775cc04d1fdc8e491fe2e7de9c1a3 (patch)
tree2a16e6763cddd84bec1fe32d69607ecc72284b51 /src
parentc64d302821eb22d2c3d1269715a0892ddb2bb342 (diff)
downloadlynx-snapshots-01876e39ab4775cc04d1fdc8e491fe2e7de9c1a3.tar.gz
snapshot of project "lynx", label v2-8-6dev_16
Diffstat (limited to 'src')
-rw-r--r--src/GridText.c58
-rw-r--r--src/HTML.c63
-rw-r--r--src/LYCharSets.c1
-rw-r--r--src/LYCharSets.h4
-rw-r--r--src/LYCharUtils.c3
-rw-r--r--src/LYCurses.c66
-rw-r--r--src/LYCurses.h16
-rw-r--r--src/LYExtern.c178
-rw-r--r--src/LYGlobalDefs.h2
-rw-r--r--src/LYList.c161
-rw-r--r--src/LYMain.c4
-rw-r--r--src/LYMainLoop.c65
-rw-r--r--src/LYMap.c46
-rw-r--r--src/LYMap.h1
-rw-r--r--src/LYUtils.c21
-rw-r--r--src/UCAuto.c265
-rw-r--r--src/UCAux.c55
-rw-r--r--src/UCdomap.c43
-rw-r--r--src/chrtrans/build-chrtrans.com3
-rw-r--r--src/chrtrans/cp857_uni.tbl157
-rw-r--r--src/chrtrans/iso10_uni.tbl226
-rw-r--r--src/chrtrans/iso13_uni.tbl114
-rw-r--r--src/chrtrans/iso14_uni.tbl114
-rw-r--r--src/chrtrans/make-msc.bat3
-rw-r--r--src/chrtrans/makefile.dos6
-rw-r--r--src/chrtrans/makefile.in6
-rw-r--r--src/chrtrans/makefile.msc6
-rw-r--r--src/chrtrans/makew32.bat3
-rw-r--r--src/chrtrans/pt154_uni.tbl296
29 files changed, 1388 insertions, 598 deletions
diff --git a/src/GridText.c b/src/GridText.c
index c2175b02..8baf4cb6 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1642,33 +1642,25 @@ static void display_title(HText *text)
*/
limit = LYscreenWidth();
if (limit < 10) {
- percent[0] = '\0'; /* Null string */
+ percent[0] = '\0';
} else if ((display_lines) <= 0 && LYlines > 0 &&
text->top_of_screen <= 99999 && text->Lines <= 999999) {
sprintf(percent, " (l%d of %d)",
text->top_of_screen, text->Lines);
- } else if ((text->Lines + 1) > (display_lines) &&
- (display_lines) > 0) {
- /*
- * In a small attempt to correct the number of pages counted....
- * GAB 07-14-94
- *
- * In a bigger attempt (hope it holds up 8-)....
- * FM 02-08-95
- */
- int total_pages =
- (((text->Lines + 1) + (display_lines - 1)) / (display_lines));
- int start_of_last_page =
- ((text->Lines + 1) < display_lines) ? 0 :
- ((text->Lines + 1) - display_lines);
+ } else if ((text->Lines >= display_lines) && (display_lines > 0)) {
+ int total_pages = ((text->Lines + display_lines - 1)
+ / display_lines);
+ int start_of_last_page = ((text->Lines <= display_lines)
+ ? 0
+ : (text->Lines - display_lines));
sprintf(percent, " (p%d of %d)",
- ((text->top_of_screen >= start_of_last_page) ?
- total_pages :
- ((text->top_of_screen + display_lines) / (display_lines))),
+ ((text->top_of_screen >= start_of_last_page)
+ ? total_pages
+ : ((text->top_of_screen + display_lines) / (display_lines))),
total_pages);
} else {
- percent[0] = '\0'; /* Null string */
+ percent[0] = '\0';
}
/*
@@ -1678,7 +1670,7 @@ static void display_title(HText *text)
*/
if (HTCJK != NOCJK) {
if (*title &&
- (tmp = typecallocn(unsigned char, (strlen(title) + 256)))) {
+ (tmp = typecallocn(unsigned char, (strlen(title) * 2 + 256)))) {
if (kanji_code == EUC) {
TO_EUC((unsigned char *) title, tmp);
} else if (kanji_code == SJIS) {
@@ -1796,12 +1788,12 @@ static void display_scrollbar(HText *text)
LYsb_begin = LYsb_end = -1;
if (!LYShowScrollbar || !text || h <= 2
- || (text->Lines + 1) <= display_lines)
+ || text->Lines <= display_lines)
return;
- if (text->top_of_screen >= text->Lines + 1 - display_lines) {
+ if (text->top_of_screen >= text->Lines - display_lines) {
/* Only part of the screen shows actual text */
- shown = text->Lines + 1 - text->top_of_screen;
+ shown = text->Lines - text->top_of_screen;
if (shown <= 0)
shown = 1;
@@ -1809,7 +1801,7 @@ static void display_scrollbar(HText *text)
shown = display_lines;
/* Each cell of scrollbar represents text->Lines/h lines of text. */
/* Always smaller than h */
- sh = (shown * h + text->Lines / 2) / (text->Lines + 1);
+ sh = (shown * h + text->Lines / 2) / text->Lines;
if (sh <= 0)
sh = 1;
if (sh >= h - 1)
@@ -1996,9 +1988,6 @@ static void display_page(HText *text,
*/
LYCursesON) {
#ifdef EXP_CHARTRANS_AUTOSWITCH
- /*
- * Currently implemented only for LINUX
- */
UCChangeTerminalCodepage(current_char_set,
&LYCharSet_UC[current_char_set]);
#endif /* EXP_CHARTRANS_AUTOSWITCH */
@@ -7207,12 +7196,15 @@ BOOL HText_canScrollUp(HText *text)
return (BOOL) (text->top_of_screen != 0);
}
+/*
+ * Check if there is more info below this page.
+ */
BOOL HText_canScrollDown(void)
{
HText *text = HTMainText;
return (BOOL) ((text != 0)
- && ((text->top_of_screen + display_lines) < text->Lines + 1));
+ && ((text->top_of_screen + display_lines) < text->Lines));
}
/* Scroll actions
@@ -9495,7 +9487,7 @@ char *HText_setLastOptionValue(HText *text, char *value,
cp[j] = '\0';
if (HTCJK != NOCJK) {
if (cp &&
- (tmp = typecallocn(unsigned char, strlen(cp) + 1)) != 0) {
+ (tmp = typecallocn(unsigned char, strlen(cp) * 2 + 1)) != 0) {
if (tmp == NULL)
outofmem(__FILE__, "HText_setLastOptionValue");
if (kanji_code == EUC) {
@@ -9558,7 +9550,9 @@ char *HText_setLastOptionValue(HText *text, char *value,
if (checked) {
int curlen = strlen(new_ptr->name);
- int newlen = strlen(HTCurSelectedOptionValue);
+ int newlen = (HTCurSelectedOptionValue
+ ? strlen(HTCurSelectedOptionValue)
+ : 0);
FormInfo *last_input = text->last_anchor->input_field;
/*
@@ -9713,7 +9707,7 @@ int HText_beginInput(HText *text, BOOL underline,
if (I->value)
StrAllocCopy(IValue, I->value);
if (IValue && HTCJK != NOCJK) {
- if ((tmp = typecallocn(unsigned char, strlen(IValue) + 1)) != 0) {
+ if ((tmp = typecallocn(unsigned char, strlen(IValue) * 2 + 1)) != 0) {
if (kanji_code == EUC) {
TO_EUC((unsigned char *) IValue, tmp);
I->value_cs = current_char_set;
@@ -12535,7 +12529,7 @@ static void update_subsequent_anchors(int newlines,
HTMainText->Lines += newlines;
HTMainText->last_anchor_number += newlines;
- more = HText_canScrollDown();
+ more_text = HText_canScrollDown();
CTRACE((tfp, "GridText: TextAnchor and HTLine struct's adjusted\n"));
diff --git a/src/HTML.c b/src/HTML.c
index 03efce72..f70bc147 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1259,7 +1259,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
/*
* Prepare to do housekeeping on the reference. - FM
*/
- if (!value[HTML_LINK_HREF]) {
+ if (isEmpty(value[HTML_LINK_HREF])) {
Base = (me->inBASE)
? me->base_href
: me->node_anchor->address;
@@ -2083,7 +2083,8 @@ static int HTML_start_element(HTStructured * me, int element_number,
int enval = 2;
column = HText_getCurrentColumn(me->text);
- if (present[HTML_TAB_TO]) {
+ if (present[HTML_TAB_TO] &&
+ non_empty(value[HTML_TAB_TO])) {
/*
* TO has priority over INDENT if both are present. - FM
*/
@@ -2848,9 +2849,10 @@ static int HTML_start_element(HTStructured * me, int element_number,
*/
me->inBoldA = TRUE;
- StrAllocCopy(href, value[HTML_A_HREF]);
- if (isEmpty(href))
+ if (isEmpty(value[HTML_A_HREF]))
StrAllocCopy(href, "#");
+ else
+ StrAllocCopy(href, value[HTML_A_HREF]);
CHECK_FOR_INTERN(intern_flag, href); /* '#' */
if (intern_flag) { /*** FAST WAY: ***/
@@ -3600,7 +3602,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
if (!me->object_started) {
/*
* This is an outer OBJECT start tag, i.e., not a nested OBJECT, so
- * save it's relevant attributes. - FM
+ * save its relevant attributes. - FM
*/
if (present) {
if (present[HTML_OBJECT_DECLARE])
@@ -3654,8 +3656,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
}
}
if (present[HTML_OBJECT_CLASSID] &&
- value[HTML_OBJECT_CLASSID] &&
- *value[HTML_OBJECT_CLASSID]) {
+ non_empty(value[HTML_OBJECT_CLASSID])) {
StrAllocCopy(me->object_classid,
value[HTML_OBJECT_CLASSID]);
TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_classid, TRUE, FALSE);
@@ -3666,8 +3667,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
}
}
if (present[HTML_OBJECT_CODEBASE] &&
- value[HTML_OBJECT_CODEBASE] &&
- *value[HTML_OBJECT_CODEBASE]) {
+ non_empty(value[HTML_OBJECT_CODEBASE])) {
StrAllocCopy(me->object_codebase,
value[HTML_OBJECT_CODEBASE]);
TRANSLATE_AND_UNESCAPE_TO_STD(&me->object_codebase);
@@ -3676,8 +3676,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
}
}
if (present[HTML_OBJECT_CODETYPE] &&
- value[HTML_OBJECT_CODETYPE] &&
- *value[HTML_OBJECT_CODETYPE]) {
+ non_empty(value[HTML_OBJECT_CODETYPE])) {
StrAllocCopy(me->object_codetype,
value[HTML_OBJECT_CODETYPE]);
TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_codetype,
@@ -3725,8 +3724,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
FREE(me->object_data);
if (me->object_data) {
HTStartAnchor5(me,
- me->object_id ? value[HTML_OBJECT_ID]
- : NULL,
+ (me->object_id
+ ? value[HTML_OBJECT_ID]
+ : NULL),
value[HTML_OBJECT_DATA],
value[HTML_OBJECT_TYPE],
tag_charset);
@@ -4173,8 +4173,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
EMIT_IFDEF_EXP_JUSTIFY_ELTS(form_in_htext = TRUE);
if (present && present[HTML_FORM_ACCEPT_CHARSET]) {
- accept_cs = value[HTML_FORM_ACCEPT_CHARSET] ?
- value[HTML_FORM_ACCEPT_CHARSET] : "UNKNOWN";
+ accept_cs = (value[HTML_FORM_ACCEPT_CHARSET]
+ ? value[HTML_FORM_ACCEPT_CHARSET]
+ : "UNKNOWN");
}
Base = (me->inBASE)
@@ -4217,8 +4218,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
}
if (present && present[HTML_FORM_METHOD])
- StrAllocCopy(method, value[HTML_FORM_METHOD] ?
- value[HTML_FORM_METHOD] : "GET");
+ StrAllocCopy(method, (value[HTML_FORM_METHOD]
+ ? value[HTML_FORM_METHOD]
+ : "GET"));
if (present && present[HTML_FORM_ENCTYPE] &&
non_empty(value[HTML_FORM_ENCTYPE])) {
@@ -4232,12 +4234,10 @@ static int HTML_start_element(HTStructured * me, int element_number,
* for a SUBJECT attribute as a synonym. - FM
*/
if (present[HTML_FORM_TITLE] &&
- value[HTML_FORM_TITLE] &&
- *value[HTML_FORM_TITLE] != '\0') {
+ non_empty(value[HTML_FORM_TITLE])) {
StrAllocCopy(title, value[HTML_FORM_TITLE]);
} else if (present[HTML_FORM_SUBJECT] &&
- value[HTML_FORM_SUBJECT] &&
- *value[HTML_FORM_SUBJECT] != '\0') {
+ non_empty(value[HTML_FORM_SUBJECT])) {
StrAllocCopy(title, value[HTML_FORM_SUBJECT]);
}
if (non_empty(title)) {
@@ -4528,9 +4528,11 @@ static int HTML_start_element(HTStructured * me, int element_number,
I.type = value[HTML_INPUT_TYPE];
if (!strcasecomp(I.type, "range")) {
- if (present[HTML_INPUT_MIN])
+ if (present[HTML_INPUT_MIN] &&
+ non_empty(value[HTML_INPUT_MIN]))
I.min = value[HTML_INPUT_MIN];
- if (present[HTML_INPUT_MAX])
+ if (present[HTML_INPUT_MAX] &&
+ non_empty(value[HTML_INPUT_MAX]))
I.max = value[HTML_INPUT_MAX];
/*
* Not yet implemented.
@@ -4544,7 +4546,8 @@ static int HTML_start_element(HTStructured * me, int element_number,
break;
} else if (!strcasecomp(I.type, "file")) {
- if (present[HTML_INPUT_ACCEPT])
+ if (present[HTML_INPUT_ACCEPT] &&
+ non_empty(value[HTML_INPUT_ACCEPT]))
I.accept = value[HTML_INPUT_ACCEPT];
#ifndef USE_FILE_UPLOAD
not_impl = "[FILE Input]";
@@ -4622,7 +4625,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
* Handle the INPUT as for a FORM. - FM
*/
if (!(present && present[HTML_INPUT_NAME] &&
- value[HTML_INPUT_NAME])) {
+ non_empty(value[HTML_INPUT_NAME]))) {
I.name = "";
} else if (strchr(value[HTML_INPUT_NAME], '&') == NULL) {
I.name = value[HTML_INPUT_NAME];
@@ -4727,9 +4730,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
}
StrAllocCopy(I_value,
- ((UseALTasVALUE == TRUE) ?
- value[HTML_INPUT_ALT] :
- value[HTML_INPUT_VALUE]));
+ ((UseALTasVALUE == TRUE)
+ ? value[HTML_INPUT_ALT]
+ : value[HTML_INPUT_VALUE]));
if (me->UsePlainSpace && !me->HiddenValue) {
I.value_cs = current_char_set;
}
@@ -8292,7 +8295,9 @@ static char *MakeNewImageValue(const char **value)
char *newtitle = NULL;
StrAllocCopy(newtitle, "[");
- ptr = strrchr(value[HTML_INPUT_SRC], '/');
+ ptr = (value[HTML_INPUT_SRC]
+ ? strrchr(value[HTML_INPUT_SRC], '/')
+ : 0);
if (!ptr) {
StrAllocCat(newtitle, value[HTML_INPUT_SRC]);
} else {
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index ee0ebe36..935763dc 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -20,6 +20,7 @@ BOOL force_old_UCLYhndl_on_reload = FALSE;
int forced_UCLYhdnl;
int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */
int current_char_set = -1; /* will be intitialized later in LYMain.c */
+int linedrawing_char_set = -1;
const char **p_entity_values = NULL; /* Pointer, for HTML_put_entity() */
/* obsolete and probably not used(???) */
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index a0f0c26a..4c85ea6d 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -29,6 +29,10 @@ extern "C" {
* currently active character set (internal handler)
*/
extern int current_char_set;
+/*
+ * character set where it is safe to draw lines on boxes.
+ */
+ extern int linedrawing_char_set;
/*
* Initializer, calls initialization function for the
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index defd13e3..2a94aada 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -2334,8 +2334,7 @@ void LYHandleMETA(HTStructured * me, const BOOL *present,
if (Switch_Display_Charset(chndl, SWITCH_DISPLAY_CHARSET_MAYBE)) {
/* UCT_STAGE_STRUCTURED and UCT_STAGE_HTEXT
should have the same setting for UCInfoStage. */
- int structured = HTAnchor_getUCInfoStage(me->node_anchor,
- UCT_STAGE_STRUCTURED);
+ HTAnchor_getUCInfoStage(me->node_anchor, UCT_STAGE_STRUCTURED);
me->outUCLYhndl = current_char_set;
HTAnchor_setUCInfoStage(me->node_anchor,
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 7b68dbda..439d8d40 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -56,7 +56,7 @@ char *XCursesProgramName = "Lynx";
#if defined(USE_COLOR_STYLE) && !defined(USE_COLOR_TABLE)
#define COLOR_BKGD ((s_normal != NOSTYLE) ? hashStyles[s_normal].color : A_NORMAL)
#else
-#define COLOR_BKGD ((COLOR_PAIRS >= 9) ? get_color_pair(9) : A_NORMAL)
+#define COLOR_BKGD ((COLOR_PAIRS >= 9) ? (chtype) get_color_pair(9) : A_NORMAL)
#endif
#ifdef USE_CURSES_PADS
@@ -320,14 +320,6 @@ void LYbox(WINDOW * win, BOOLEAN formfield GCC_UNUSED)
waddch(win, 'q');
waddstr(win, "j\017");
#else /* !VMS */
- /*
- * If the terminal is in UTF-8 mode, it probably cannot understand box
- * drawing characters as (n)curses handles them. (This may also be true
- * for other display character sets, but isn't currently checked.) In that
- * case, substitute ASCII characters for BOXVERT and BOXHORI if they were
- * defined to 0 for automatic use of box drawing characters. They'll stay
- * as they are otherwise. - KW & FM
- */
int boxvert, boxhori;
UCSetBoxChars(current_char_set, &boxvert, &boxhori, BOXVERT, BOXHORI);
@@ -564,16 +556,18 @@ int lynx_default_colors(void)
{
int code = 0;
- if (lynx_called_initscr) {
- code = -1;
- if (!default_color_reset && use_default_colors() == OK) {
- default_fg = DEFAULT_COLOR;
- default_bg = DEFAULT_COLOR;
- code = 1;
- } else {
- default_fg = COLOR_WHITE;
- default_bg = COLOR_BLACK;
- default_color_reset = TRUE;
+ if (!default_color_reset) {
+ if (lynx_called_initscr) {
+ code = -1;
+ if (use_default_colors() == OK) {
+ default_fg = DEFAULT_COLOR;
+ default_bg = DEFAULT_COLOR;
+ code = 1;
+ } else {
+ default_fg = COLOR_WHITE;
+ default_bg = COLOR_BLACK;
+ default_color_reset = TRUE;
+ }
}
}
return code;
@@ -746,7 +740,7 @@ void lynx_set_color(int a)
if (lynx_has_color && LYShowColor >= SHOW_COLOR_ON) {
wattrset(LYwin, lynx_color_cfg_attr(a)
| (((a + 1) < COLOR_PAIRS)
- ? get_color_pair(a + 1)
+ ? (chtype) get_color_pair(a + 1)
: A_NORMAL));
}
}
@@ -2749,7 +2743,7 @@ static void make_blink_boldbg(void)
*/
long LYgetattrs(WINDOW * win)
{
-#if ( defined(HAVE_GETATTRS) && ( !defined(NCURSES_MAJOR_VERSION) || NCURSES_VERSION_MAJOR < 5 ) )
+#if ( defined(HAVE_GETATTRS) && ( !defined(NCURSES_VERSION_MAJOR) || NCURSES_VERSION_MAJOR < 5 ) )
long result = 0;
result = getattrs(win);
@@ -2766,3 +2760,33 @@ long LYgetattrs(WINDOW * win)
return result;
}
#endif /* HAVE_WATTR_GET */
+
+#if defined(NCURSES_VERSION_PATCH) && NCURSES_VERSION_PATCH > 20021012
+#ifndef HAVE_USE_LEGACY_CODING
+/*
+ * Between ncurses 5.3 and 5.4 as part of fixes for wide-character mode, the
+ * locale support no longer allows characters in the range 128-159 to be
+ * treated as printable characters. Here is a workaround to fool
+ * waddch_nosync() into treating "all" 8-bit characters as printable.
+ */
+NCURSES_CONST char *unctrl(chtype ch)
+{
+ static char result[3];
+ unsigned data = (unsigned char)ch;
+
+ if (data < 32) {
+ result[0] = '^';
+ result[1] = ch | '@';
+ result[2] = 0;
+ } else if (data == 127) {
+ result[0] = '^';
+ result[1] = '?';
+ result[2] = 0;
+ } else {
+ result[0] = data;
+ result[1] = 0;
+ }
+ return result;
+}
+#endif /* HAVE_USE_LEGACY_CODING */
+#endif
diff --git a/src/LYCurses.h b/src/LYCurses.h
index a632bac0..547a9117 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -387,7 +387,11 @@ extern "C" {
* Usable limits for display:
*/
#if defined(FANCY_CURSES) || defined(USE_SLANG)
+#if defined(PDCURSES)
+#define LYcolLimit (LYcols - LYbarWidth - 1) /* PDCurses wrapping is buggy */
+#else
#define LYcolLimit (LYcols - LYbarWidth)
+#endif
#else
#define LYcolLimit (LYcols - 1)
#endif
@@ -519,11 +523,23 @@ extern "C" {
#endif
#define LYaddch(ch) SLsmg_write_char(ch)
+
+#if SLANG_VERSION >= 20000
+#define addch_raw(ch) do { \
+ SLsmg_Char_Type buf; \
+ buf.nchars = 1; \
+ buf.wchars[0] = ch; \
+ buf.color = Current_Attr; \
+ SLsmg_write_raw (&buf, 1); \
+ } while (0)
+#else
#define addch_raw(ch) do { \
SLsmg_Char_Type buf; \
buf = (ch) | (Current_Attr << 4); \
SLsmg_write_raw (&buf, 1); \
} while (0)
+#endif /* SLANG_VERSION >= 20000 */
+
#define echo()
#define printw SLsmg_printf
diff --git a/src/LYExtern.c b/src/LYExtern.c
index e042820c..9f5471db 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -66,16 +66,88 @@ static char *decode_string(char *s)
#ifdef WIN_EX
/*
* Quote the path to make it safe for shell command processing.
+ * We always quote it not only includes spaces in it.
+ * At least we should quote paths which include "&".
*/
char *quote_pathname(char *pathname)
{
char *result = NULL;
- if (strchr(pathname, ' ') != NULL) {
- HTSprintf0(&result, "\"%s\"", pathname);
- } else {
- StrAllocCopy(result, pathname);
+ HTSprintf0(&result, "\"%s\"", pathname);
+ return result;
+}
+
+/*
+ * Delete dangerous characters as local path.
+ * We delete '<>|' and also '%"'.
+ * '%' should be deleted because it's difficut to escape for all cases.
+ * So we can't treat paths which include '%'.
+ * '"' should be deleted because it's a obstacle to quote whole path.
+ */
+static void delete_danger_characters(char *src)
+{
+ char *dst;
+
+ for (dst = src; *src != '\0'; src++) {
+ if (strchr("<>|%\"", *src) == NULL) {
+ *dst = *src;
+ dst++;
+ }
}
+ *dst = '\0';
+}
+
+static char *escapeParameter(CONST char *parameter)
+{
+ size_t i;
+ size_t last = strlen(parameter);
+ size_t n = 0;
+ size_t encoded = 0;
+ size_t escaped = 0;
+ char *result;
+ char *needs_encoded = "<>|";
+ char *needs_escaped = "%";
+ char *needs_escaped_NT = "%&^";
+
+ for (i = 0; i < last; ++i) {
+ if (strchr(needs_encoded, parameter[i]) != NULL) {
+ ++encoded;
+ }
+ if (system_is_NT) {
+ if (strchr(needs_escaped_NT, parameter[i]) != NULL) {
+ ++escaped;
+ }
+ } else if (strchr(needs_escaped, parameter[i]) != NULL) {
+ ++escaped;
+ }
+ }
+
+ result = (char *) malloc(last + encoded * 2 + escaped + 1);
+ if (result == NULL)
+ outofmem(__FILE__, "escapeParameter");
+
+ n = 0;
+ for (i = 0; i < last; i++) {
+ if (strchr(needs_encoded, parameter[i]) != NULL) {
+ sprintf(result + n, "%%%02X", (unsigned char) parameter[i]);
+ n += 3;
+ continue;
+ }
+ if (system_is_NT) {
+ if (strchr(needs_escaped_NT, parameter[i]) != NULL) {
+ result[n++] = '^';
+ result[n++] = parameter[i];
+ continue;
+ }
+ } else if (strchr(needs_escaped, parameter[i]) != NULL) {
+ result[n++] = '%'; /* parameter[i] is '%' */
+ result[n++] = parameter[i];
+ continue;
+ }
+ result[n++] = parameter[i];
+ }
+ result[n] = '\0';
+
return result;
}
#endif /* WIN_EX */
@@ -103,62 +175,66 @@ static char *format_command(char *command,
char *cmdbuf = NULL;
#if defined(WIN_EX)
- if (*param != '"' && strchr(param, ' ') != NULL) {
- char *cp = quote_pathname(param);
-
- format(&cmdbuf, command, cp);
- FREE(cp);
- } else {
- char pram_string[LY_MAXPATH];
+ char pram_string[LY_MAXPATH];
+ char *escaped = NULL;
+ if (strnicmp("file://localhost/", param, 17) == 0) {
+ /* decode local path parameter for programs to be
+ able to interpret - TH */
LYstrncpy(pram_string, param, sizeof(pram_string) - 1);
decode_string(pram_string);
param = pram_string;
+ } else {
+ /* encode or escape URL parameter - TH */
+ escaped = escapeParameter(param);
+ param = escaped;
+ }
- if (isMAILTO_URL(param)) {
- format(&cmdbuf, command, param + 7);
- } else if (strnicmp("telnet://", param, 9) == 0) {
- char host[sizeof(pram_string)];
- int last_pos;
-
- strcpy(host, param + 9);
- last_pos = strlen(host) - 1;
- if (last_pos > 1 && host[last_pos] == '/')
- host[last_pos] = '\0';
-
- format(&cmdbuf, command, host);
- } else if (strnicmp("file://localhost/", param, 17) == 0) {
- char e_buff[LY_MAXPATH], *p;
-
- p = param + 17;
- *e_buff = 0;
- if (strchr(p, ':') == NULL) {
- sprintf(e_buff, "%.3s/", windows_drive);
- }
- strncat(e_buff, p, sizeof(e_buff) - strlen(e_buff) - 1);
- p = strrchr(e_buff, '.');
- if (p) {
- trimPoundSelector(p);
- }
+ if (isMAILTO_URL(param)) {
+ format(&cmdbuf, command, param + 7);
+ } else if (strnicmp("telnet://", param, 9) == 0) {
+ char host[sizeof(pram_string)];
+ int last_pos;
+
+ LYstrncpy(host, param + 9, sizeof(host));
+ last_pos = strlen(host) - 1;
+ if (last_pos > 1 && host[last_pos] == '/')
+ host[last_pos] = '\0';
+
+ format(&cmdbuf, command, host);
+ } else if (strnicmp("file://localhost/", param, 17) == 0) {
+ char e_buff[LY_MAXPATH], *p;
+
+ p = param + 17;
+ delete_danger_characters(p);
+ *e_buff = 0;
+ if (strchr(p, ':') == NULL) {
+ sprintf(e_buff, "%.3s/", windows_drive);
+ }
+ strncat(e_buff, p, sizeof(e_buff) - strlen(e_buff) - 1);
+ p = strrchr(e_buff, '.');
+ if (p) {
+ trimPoundSelector(p);
+ }
- /* Less ==> short filename with backslashes,
- * less ==> long filename with forward slashes, may be quoted
- */
- if (ISUPPER(command[0])) {
- format(&cmdbuf,
- command, HTDOS_short_name(e_buff));
- } else {
- if (*e_buff != '"' && strchr(e_buff, ' ') != NULL) {
- p = quote_pathname(e_buff);
- LYstrncpy(e_buff, p, sizeof(e_buff) - 1);
- FREE(p);
- }
- format(&cmdbuf, command, e_buff);
- }
+ /* Less ==> short filename with backslashes,
+ * less ==> long filename with forward slashes, may be quoted
+ */
+ if (ISUPPER(command[0])) {
+ char *short_name = HTDOS_short_name(e_buff);
+
+ p = quote_pathname(short_name);
+ format(&cmdbuf, command, p);
+ FREE(p);
} else {
- format(&cmdbuf, command, param);
+ p = quote_pathname(e_buff);
+ format(&cmdbuf, command, p);
+ FREE(p);
}
+ } else {
+ format(&cmdbuf, command, param);
}
+ FREE(escaped);
#else
format(&cmdbuf, command, param);
#endif
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 3f8f32e5..82a828ff 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -221,7 +221,7 @@ extern "C" {
extern BOOLEAN jump_buffer; /* TRUE if offering default shortcut */
extern BOOLEAN long_url_ok;
extern BOOLEAN lynx_mode;
- extern BOOLEAN more; /* is there more document to display? */
+ extern BOOLEAN more_text; /* is there more document to display? */
extern BOOLEAN news_ok;
extern BOOLEAN number_fields_on_left;
extern BOOLEAN number_links_on_left;
diff --git a/src/LYList.c b/src/LYList.c
index 25efb9f9..8ab0df40 100644
--- a/src/LYList.c
+++ b/src/LYList.c
@@ -10,6 +10,7 @@
#include <LYUtils.h>
#include <GridText.h>
#include <LYList.h>
+#include <LYMap.h>
#include <LYClean.h>
#include <LYGlobalDefs.h>
#include <LYCharUtils.h>
@@ -231,6 +232,80 @@ int showlist(DocInfo *newdoc, BOOLEAN titles)
return (0);
}
+static void print_refs(FILE *fp, BOOLEAN titles, int refs)
+{
+ int cnt;
+ char *address = NULL;
+ const char *desc = gettext("unknown field or link");
+ void *helper = NULL; /* init */
+
+ for (cnt = 1; cnt <= refs; cnt++) {
+ HTChildAnchor *child = HText_childNextNumber(cnt, &helper);
+ HTAnchor *dest;
+ HTParentAnchor *parent;
+ const char *title;
+
+ if (child == 0) {
+ /*
+ * child should not be 0 unless form field numbering is on and
+ * cnt is the number of a form input field.
+ * HText_FormDescNumber() will set desc to a description of
+ * what type of input field this is. We'll create a
+ * within-document link to ensure that the link numbers on the
+ * list page match the numbering in the original document, but
+ * won't create a forward link to the form. - FM && LE
+ */
+ if (fields_are_numbered()) {
+ HText_FormDescNumber(cnt, &desc);
+ fprintf(fp, "%4d. form field = %s\n", cnt, desc);
+ }
+ continue;
+ }
+ dest = HTAnchor_followLink(child);
+ /*
+ * Ignore if child anchor points to itself, i.e., we had something
+ * like <A NAME=xyz HREF="#xyz"> and it is not treated as a hidden
+ * link. Useful if someone 'P'rints the List Page (which isn't a
+ * very useful action to do, but anyway...) - kw
+ */
+ if (dest == (HTAnchor *) child)
+ continue;
+ parent = HTAnchor_parent(dest);
+ title = titles ? HTAnchor_title(parent) : NULL;
+ address = HTAnchor_address(dest);
+ fprintf(fp, "%4d. %s%s\n", cnt,
+ ((HTAnchor *) parent != dest) && title ? "in " : "",
+ (title ? title : address));
+ FREE(address);
+#ifdef VMS
+ if (HadVMSInterrupt)
+ break;
+#endif /* VMS */
+ }
+}
+
+static void print_hidden_refs(FILE *fp, int refs, int hidden_links)
+{
+ int cnt;
+ char *address = NULL;
+
+ fprintf(fp, "%s %s\n", ((refs > 0) ? "\n" : ""),
+ gettext("Hidden links:"));
+ for (cnt = 0; cnt < hidden_links; cnt++) {
+ StrAllocCopy(address, HText_HiddenLinkAt(HTMainText, cnt));
+ if (isEmpty(address)) {
+ FREE(address);
+ continue;
+ }
+ fprintf(fp, "%4d. %s\n", ((cnt + 1) + refs), address);
+ FREE(address);
+#ifdef VMS
+ if (HadVMSInterrupt)
+ break;
+#endif /* VMS */
+ }
+}
+
/* printlist - F.Macrides (macrides@sci.wfeb.edu)
* ---------
* Print a text/plain list of HyperText References
@@ -242,87 +317,25 @@ int showlist(DocInfo *newdoc, BOOLEAN titles)
*/
void printlist(FILE *fp, BOOLEAN titles)
{
- int cnt;
int refs, hidden_links;
- char *address = NULL;
- const char *desc = gettext("unknown field or link");
- void *helper;
refs = HText_sourceAnchors(HTMainText);
- if (refs <= 0 && LYHiddenLinks != HIDDENLINKS_SEPARATE)
- return;
- hidden_links = HText_HiddenLinkCount(HTMainText);
- if (refs <= 0 && hidden_links <= 0) {
- return;
- } else {
- fprintf(fp, "\n%s\n\n", gettext("References"));
- if (LYHiddenLinks == HIDDENLINKS_IGNORE)
- hidden_links = 0;
- if (hidden_links > 0) {
- fprintf(fp, " %s\n", gettext("Visible links"));
- }
- helper = NULL; /* init */
- for (cnt = 1; cnt <= refs; cnt++) {
- HTChildAnchor *child = HText_childNextNumber(cnt, &helper);
- HTAnchor *dest;
- HTParentAnchor *parent;
- const char *title;
-
- if (child == 0) {
- /*
- * child should not be 0 unless form field numbering is on and
- * cnt is the number of a form input field.
- * HText_FormDescNumber() will set desc to a description of
- * what type of input field this is. We'll create a
- * within-document link to ensure that the link numbers on the
- * list page match the numbering in the original document, but
- * won't create a forward link to the form. - FM && LE
- */
- if (fields_are_numbered()) {
- HText_FormDescNumber(cnt, &desc);
- fprintf(fp, "%4d. form field = %s\n", cnt, desc);
- }
- continue;
+ if (refs > 0 || LYHiddenLinks == HIDDENLINKS_SEPARATE) {
+ hidden_links = HText_HiddenLinkCount(HTMainText);
+ if (refs > 0 || hidden_links > 0) {
+ fprintf(fp, "\n%s\n\n", gettext("References"));
+ if (LYHiddenLinks == HIDDENLINKS_IGNORE)
+ hidden_links = 0;
+ if (hidden_links > 0) {
+ fprintf(fp, " %s\n", gettext("Visible links"));
}
- dest = HTAnchor_followLink(child);
- /*
- * Ignore if child anchor points to itself, i.e., we had something
- * like <A NAME=xyz HREF="#xyz"> and it is not treated as a hidden
- * link. Useful if someone 'P'rints the List Page (which isn't a
- * very useful action to do, but anyway...) - kw
- */
- if (dest == (HTAnchor *) child)
- continue;
- parent = HTAnchor_parent(dest);
- title = titles ? HTAnchor_title(parent) : NULL;
- address = HTAnchor_address(dest);
- fprintf(fp, "%4d. %s%s\n", cnt,
- ((HTAnchor *) parent != dest) && title ? "in " : "",
- (title ? title : address));
- FREE(address);
-#ifdef VMS
- if (HadVMSInterrupt)
- break;
-#endif /* VMS */
- }
+ print_refs(fp, titles, refs);
- if (hidden_links > 0) {
- fprintf(fp, "%s %s\n", ((refs > 0) ? "\n" : ""),
- gettext("Hidden links:"));
- for (cnt = 0; cnt < hidden_links; cnt++) {
- StrAllocCopy(address, HText_HiddenLinkAt(HTMainText, cnt));
- if (isEmpty(address)) {
- FREE(address);
- continue;
- }
- fprintf(fp, "%4d. %s\n", ((cnt + 1) + refs), address);
- FREE(address);
-#ifdef VMS
- if (HadVMSInterrupt)
- break;
-#endif /* VMS */
+ if (hidden_links > 0) {
+ print_hidden_refs(fp, refs, hidden_links);
}
}
}
+ LYPrintImgMaps(fp);
return;
}
diff --git a/src/LYMain.c b/src/LYMain.c
index 0aa29e71..b9cc453f 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -377,7 +377,7 @@ BOOLEAN check_realm = FALSE; /* Restrict to the starting realm? */
BOOLEAN clickable_images = MAKE_LINKS_FOR_ALL_IMAGES;
BOOLEAN crawl = FALSE; /* Do crawl? */
BOOLEAN keep_mime_headers = FALSE; /* Include mime headers with source dump */
-BOOLEAN more = FALSE; /* is there more text to display? */
+BOOLEAN more_text = FALSE; /* is there more text to display? */
BOOLEAN more_links = FALSE; /* Links beyond a displayed page with no links? */
BOOLEAN no_list = FALSE;
BOOLEAN no_margins = FALSE;
@@ -534,7 +534,7 @@ int ssl_noprompt = FORCE_PROMPT_DFT;
int connect_timeout = 18000; /*=180000*0.1 - used in HTDoConnect.*/
#ifdef EXP_JUSTIFY_ELTS
-BOOL ok_justify = TRUE;
+BOOL ok_justify = FALSE;
int justify_max_void_percent = 35;
#endif
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 1de98d5b..27ec6c65 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -2202,7 +2202,7 @@ static void handle_LYK_DOWN_HALF(int *old_c,
{
int i;
- if (more) {
+ if (more_text) {
Newline += (display_lines / 2);
if (nlinks > 0 && curdoc.link > -1 &&
links[curdoc.link].ly > display_lines / 2) {
@@ -2235,14 +2235,14 @@ static void handle_LYK_DOWN_LINK(int *follow_col,
newlink = find_link_near_col(*follow_col, 1);
if (newlink > -1) {
set_curdoc_link(newlink);
- } else if (more) { /* next page */
+ } else if (more_text) { /* next page */
Newline += display_lines;
} else if (*old_c != real_c) {
*old_c = real_c;
HTUserMsg(NO_LINKS_BELOW);
return;
}
- } else if (more) { /* next page */
+ } else if (more_text) { /* next page */
Newline += display_lines;
} else if (*old_c != real_c) {
@@ -2256,7 +2256,7 @@ static void handle_LYK_DOWN_TWO(int *old_c,
{
int i;
- if (more) {
+ if (more_text) {
Newline += 2;
if (nlinks > 0 && curdoc.link > -1 &&
links[curdoc.link].ly > 2) {
@@ -2679,7 +2679,7 @@ static BOOLEAN handle_LYK_FASTBACKW_LINK(int *cmd,
sametext(links[nextlink].l_form->name, thisname));
samepage = 1;
- } else if (!more && LYGetNewline() == 1 &&
+ } else if (!more_text && LYGetNewline() == 1 &&
(links[0].type == WWW_FORM_LINK_TYPE &&
links[0].l_form->type == F_TEXTAREA_TYPE &&
links[0].l_form->number == thisgroup &&
@@ -2691,14 +2691,14 @@ static BOOLEAN handle_LYK_FASTBACKW_LINK(int *cmd,
nextlink = nlinks - 1;
samepage = 1;
- } else if (!more && LYGetNewline() == 1 && curdoc.link > 0) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link > 0) {
nextlink = 0;
samepage = 1;
}
} else if (curdoc.link > 0) {
nextlink--;
samepage = 1;
- } else if (!more && LYGetNewline() == 1) {
+ } else if (!more_text && LYGetNewline() == 1) {
nextlink = nlinks - 1;
samepage = 1;
}
@@ -2785,14 +2785,14 @@ static void handle_LYK_FASTFORW_LINK(int *old_c,
links[nextlink].l_form->number == thisgroup &&
sametext(links[nextlink].l_form->name, thisname));
samepage = 1;
- } else if (!more && LYGetNewline() == 1 && curdoc.link > 0) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link > 0) {
nextlink = 0;
samepage = 1;
}
} else if (curdoc.link < nlinks - 1) {
nextlink++;
samepage = 1;
- } else if (!more && LYGetNewline() == 1 && curdoc.link > 0) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link > 0) {
nextlink = 0;
samepage = 1;
}
@@ -2800,14 +2800,14 @@ static void handle_LYK_FASTFORW_LINK(int *old_c,
if (samepage) {
set_curdoc_link(nextlink);
- } else if (!more && LYGetNewline() == 1 && curdoc.link == nlinks - 1) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link == nlinks - 1) {
/*
* At the bottom of list and there is only one page. Move to the top
* link on the page.
*/
set_curdoc_link(0);
- } else if (more && /* need a later page */
+ } else if (more_text && /* need a later page */
HTGetLinkOrFieldStart(curdoc.link,
&Newline, &newdoc.link,
1, TRUE) != NO) {
@@ -3827,10 +3827,10 @@ static void handle_LYK_NEXT_LINK(int c,
* At the bottom of list and there is only one page. Move to the top
* link on the page.
*/
- } else if (!more && LYGetNewline() == 1 && curdoc.link == nlinks - 1) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link == nlinks - 1) {
set_curdoc_link(0);
- } else if (more) { /* next page */
+ } else if (more_text) { /* next page */
Newline += display_lines;
} else if (*old_c != real_c) {
@@ -3842,7 +3842,7 @@ static void handle_LYK_NEXT_LINK(int c,
static void handle_LYK_NEXT_PAGE(int *old_c,
int real_c)
{
- if (more) {
+ if (more_text) {
Newline += display_lines;
} else if (curdoc.link < nlinks - 1) {
set_curdoc_link(nlinks - 1);
@@ -3880,7 +3880,7 @@ static void handle_LYK_PREV_LINK(int *arrowup,
if (curdoc.link > 0) { /* previous link */
set_curdoc_link(curdoc.link - 1);
- } else if (!more &&
+ } else if (!more_text &&
curdoc.link == 0 && LYGetNewline() == 1) { /* at the top of list */
/*
* If there is only one page of data and the user goes off the top,
@@ -4472,9 +4472,10 @@ static void handle_LYK_TAG_LINK(void)
}
if (curdoc.link < nlinks - 1) {
set_curdoc_link(curdoc.link + 1);
- } else if (!more && LYGetNewline() == 1 && curdoc.link == nlinks - 1) {
+ } else if (!more_text && LYGetNewline() == 1 && curdoc.link == nlinks
+ - 1) {
set_curdoc_link(0);
- } else if (more) { /* next page */
+ } else if (more_text) { /* next page */
Newline += (display_lines);
}
}
@@ -4485,7 +4486,7 @@ static void handle_LYK_TOGGLE_HELP(void)
{
if (user_mode == NOVICE_MODE) {
toggle_novice_line();
- noviceline(more);
+ noviceline(more_text);
}
}
@@ -4991,7 +4992,7 @@ static void handle_LYK_digit(int c,
*/
if (LYGetNewline() <= 1) {
HTInfoMsg(ALREADY_AT_BEGIN);
- } else if (!more) {
+ } else if (!more_text) {
HTInfoMsg(ALREADY_AT_END);
} else {
StrAllocCopy(temp, user_input_buffer);
@@ -6260,9 +6261,10 @@ int mainloop(void)
#endif /* DIRED_SUPPORT */
/*
- * If more equals TRUE, then there is more info below this page.
+ * Check if there is more info below this page.
*/
- more = HText_canScrollDown();
+ more_text = HText_canScrollDown();
+
if (newdoc.link < 0)
goto_line(LYGetNewline());
LYSetNewline(HText_getTopOfScreen() + 1);
@@ -6343,9 +6345,9 @@ int mainloop(void)
#endif /* DIRED_SUPPORT */
/*
- * If more equals TRUE, then there is more info below this page.
+ * Check if there is more info below this page.
*/
- more = HText_canScrollDown();
+ more_text = HText_canScrollDown();
/*
* Adjust curdoc.link as above; nlinks may have changed, if the
@@ -6360,7 +6362,7 @@ int mainloop(void)
}
if (user_mode == NOVICE_MODE)
- noviceline(more); /* print help message */
+ noviceline(more_text); /* print help message */
refresh_screen = FALSE;
}
@@ -6574,7 +6576,7 @@ int mainloop(void)
&& strcmp(links[curdoc.link].l_form->name,
links[curdoc.link + 1].l_form->name)
== 0) ||
- (curdoc.link == nlinks - 1 && more &&
+ (curdoc.link == nlinks - 1 && more_text &&
HText_TAHasMoreLines(curdoc.link, 1)))) ||
((LKC_TO_LAC(keymap, real_c) == LYK_PREV_LINK ||
LKC_TO_LAC(keymap, real_c) == LYK_LPOS_PREV_LINK ||
@@ -6618,7 +6620,8 @@ int mainloop(void)
if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
links[curdoc.link].l_form->type == F_TEXTAREA_TYPE)
&& ((curdoc.link == nlinks - 1 &&
- !(more && HText_TAHasMoreLines(curdoc.link, 1)))
+ !(more_text &&
+ HText_TAHasMoreLines(curdoc.link, 1)))
||
((curdoc.link < nlinks - 1) &&
!(links[curdoc.link + 1].type == WWW_FORM_LINK_TYPE
@@ -6802,7 +6805,7 @@ int mainloop(void)
} else
#endif
show_main_statusline(links[curdoc.link], FOR_INPUT);
- } else if (more) {
+ } else if (more_text) {
HTInfoMsg(MOREHELP);
} else {
HTInfoMsg(HELP);
@@ -7592,7 +7595,7 @@ static void show_main_statusline(const LinkInfo curlink,
* Make sure form novice lines are replaced.
*/
if (user_mode == NOVICE_MODE && for_what != FOR_INPUT) {
- noviceline(more);
+ noviceline(more_text);
}
if (HTisDocumentSource()) {
@@ -7647,8 +7650,8 @@ static void show_main_statusline(const LinkInfo curlink,
}
if (!cp)
cp = curlink.lname;
- status_link(cp, more, is_www_index);
- } else if (is_www_index && more) {
+ status_link(cp, more_text, is_www_index);
+ } else if (is_www_index && more_text) {
char buf[128];
sprintf(buf, WWW_INDEX_MORE_MESSAGE, key_for_func(LYK_INDEX_SEARCH));
@@ -7658,7 +7661,7 @@ static void show_main_statusline(const LinkInfo curlink,
sprintf(buf, WWW_INDEX_MESSAGE, key_for_func(LYK_INDEX_SEARCH));
_statusline(buf);
- } else if (more) {
+ } else if (more_text) {
if (user_mode == NOVICE_MODE)
_statusline(MORE);
else
diff --git a/src/LYMap.c b/src/LYMap.c
index 5b563b85..9fd0e073 100644
--- a/src/LYMap.c
+++ b/src/LYMap.c
@@ -29,6 +29,8 @@
#include <LYexit.h>
#include <LYLeaks.h>
+#define NO_MAP_TITLE "[USEMAP]"
+
typedef struct _LYMapElement {
char *address;
char *title;
@@ -204,7 +206,7 @@ BOOL LYAddImageMap(char *address,
}
/*
- * Utility for adding LYMapElements to LYImageMaps
+ * Utility for adding LYMapElement's to LYImageMap's
* in the appropriate list. - FM
*/
BOOL LYAddMapElement(char *map,
@@ -238,8 +240,9 @@ BOOL LYAddMapElement(char *map,
* therefore represent a POST response, so use the specific list. - kw
*/
theList = node_anchor->imaps;
- if (!theList)
+ if (!theList) {
return FALSE;
+ }
} else
#endif
{
@@ -283,6 +286,11 @@ BOOL LYAddMapElement(char *map,
tmp->intern_flag = intern_flag;
#endif
HTList_appendObject(theMap->elements, tmp);
+
+ CTRACE((tfp,
+ "LYAddMapElement\n\tmap %s\n\taddress %s\n\ttitle %s)\n",
+ NonNull(map), NonNull(address), NonNull(title)));
+
return TRUE;
}
@@ -530,13 +538,13 @@ static int LYLoadIMGmap(const char *arg,
} else if (non_empty(anAnchor->title)) {
StrAllocCopy(MapTitle, anAnchor->title);
} else if (non_empty(LYRequestTitle) &&
- strcasecomp(LYRequestTitle, "[USEMAP]")) {
+ strcasecomp(LYRequestTitle, NO_MAP_TITLE)) {
StrAllocCopy(MapTitle, LYRequestTitle);
} else if ((cp = strchr(address, '#')) != NULL) {
StrAllocCopy(MapTitle, (cp + 1));
}
if (isEmpty(MapTitle)) {
- StrAllocCopy(MapTitle, "[USEMAP]");
+ StrAllocCopy(MapTitle, NO_MAP_TITLE);
} else {
LYEntify(&MapTitle, TRUE);
}
@@ -551,8 +559,8 @@ static int LYLoadIMGmap(const char *arg,
PUTS(buf);
/*
* This page is a list of titles and anchors for them. Since titles
- * already passed SGML/HTML stage they converted to current_char_set. That
- * is why we insist on META charset for this page.
+ * already passed SGML/HTML stage they are converted to current_char_set.
+ * That is why we insist on META charset for this page.
*/
HTSprintf0(&buf, "<title>%s</title>\n", MapTitle);
PUTS(buf);
@@ -600,6 +608,32 @@ static int LYLoadIMGmap(const char *arg,
return (HT_LOADED);
}
+void LYPrintImgMaps(FILE *fp)
+{
+ HTList *outer = LynxMaps;
+ HTList *inner;
+ LYImageMap *map;
+ LYMapElement *elt;
+ int count;
+
+ if (HTList_count(outer) > 0) {
+ while (NULL != (map = (LYImageMap *) HTList_nextObject(outer))) {
+ fprintf(fp, "\n%s\n", isEmpty(map->title) ? NO_MAP_TITLE : map->title);
+ fprintf(fp, "%s\n", map->address);
+ inner = map->elements;
+ count = 0;
+ while (NULL != (elt = (LYMapElement *) HTList_nextObject(inner))) {
+ fprintf(fp, "%4d. %s", ++count, elt->address);
+#ifndef DONT_TRACK_INTERNAL_LINKS
+ if (map->intern_flag)
+ fprintf(fp, " TYPE=\"internal link\"");
+#endif
+ fprintf(fp, "\n");
+ }
+ }
+ }
+}
+
#ifdef GLOBALDEF_IS_MACRO
#define _LYIMGMAP_C_GLOBALDEF_1_INIT { "LYNXIMGMAP", LYLoadIMGmap, 0}
GLOBALDEF(HTProtocol, LYLynxIMGmap, _LYIMGMAP_C_GLOBALDEF_1_INIT);
diff --git a/src/LYMap.h b/src/LYMap.h
index bd16ad8b..28a60178 100644
--- a/src/LYMap.h
+++ b/src/LYMap.h
@@ -14,6 +14,7 @@ extern "C" {
extern BOOL LYMapsOnly;
extern void ImageMapList_free(HTList *list);
+ extern void LYPrintImgMaps(FILE *fp);
extern BOOL LYAddImageMap(char *address, char *title,
HTParentAnchor *node_anchor);
extern BOOL LYAddMapElement(char *map, char *address, char *title,
diff --git a/src/LYUtils.c b/src/LYUtils.c
index ca4a3741..5bb16f50 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1247,6 +1247,19 @@ char *strip_trailing_slash(char *dirname)
}
/*
+ * Remove most blanks, but restore one trailing blank to make prompts nicer.
+ */
+static void remove_most_blanks(char *buffer)
+{
+ int length = strlen(buffer);
+ BOOL trailing = (length != 0) && (buffer[length - 1] == ' ');
+
+ LYReduceBlanks(buffer);
+ if (trailing)
+ strcat(buffer, " ");
+}
+
+/*
* Display (or hide) the status line.
*/
BOOLEAN mustshow = FALSE;
@@ -1324,7 +1337,7 @@ void statusline(const char *text)
/*
* Deal with any newlines or tabs in the string. - FM
*/
- LYReduceBlanks((char *) temp);
+ remove_most_blanks((char *) temp);
/*
* Handle the Kanji, making sure the text is not longer than the
@@ -1350,7 +1363,7 @@ void statusline(const char *text)
/*
* Deal with any newlines or tabs in the string. - FM
*/
- LYReduceBlanks(text_buff);
+ remove_most_blanks(text_buff);
#ifdef WIDEC_CURSES
len = strlen(text_buff);
if (len >= (int) (sizeof(buffer) - 1))
@@ -1528,7 +1541,9 @@ int LYReopenInput(void)
isatty(fileno(stderr)) &&
(term_name = ttyname(fileno(stderr))) != NULL)
new_fd = open(term_name, O_RDONLY);
+#endif
+#ifdef HAVE_CTERMID
if (new_fd == -1 &&
(term_name = ctermid(NULL)) != NULL)
new_fd = open(term_name, O_RDONLY);
@@ -7268,6 +7283,8 @@ const char *LYSysShell(void)
if (shell) {
if (access(shell, 0) != 0)
shell = LYGetEnv("COMSPEC");
+ } else {
+ shell = LYGetEnv("COMSPEC");
}
if (shell == NULL) {
if (system_is_NT)
diff --git a/src/UCAuto.c b/src/UCAuto.c
index 0f71a000..12f82b69 100644
--- a/src/UCAuto.c
+++ b/src/UCAuto.c
@@ -21,12 +21,19 @@
#include <UCDefs.h>
#include <UCAuto.h>
#include <LYGlobalDefs.h>
+#include <LYStrings.h>
#include <LYClean.h>
#include <LYLeaks.h>
#include <LYCharSets.h>
#ifdef EXP_CHARTRANS_AUTOSWITCH
+#include <HTFile.h>
+
+#ifdef LINUX
+#include <sysexits.h> /* EX_DATAERR, etc. */
+#endif
+
# ifdef CAN_SWITCH_DISPLAY_CHARSET
char *charset_switch_rules;
char *charsets_directory;
@@ -38,6 +45,10 @@ int switch_display_charsets;
# endif
+#ifdef HAVE_USE_LEGACY_CODING
+static int original_coding = 0;
+#endif
+
# ifdef __EMX__
/* If we "just include" <os2.h>, BOOLEAN conflicts. */
# define BOOLEAN OS2_BOOLEAN /* This file doesn't use it, conflicts */
@@ -50,22 +61,58 @@ int switch_display_charsets;
#ifdef LINUX
typedef enum {
- Is_Unset, Is_Set, Dunno, Dont_Care
+ Is_Unset,
+ Is_Set,
+ Dunno,
+ Dont_Care
} TGen_state_t;
+
+/*
+ * List the states the console has been set to via SCS (select character-set).
+ */
typedef enum {
- G0, G1
-} TGNstate_t;
-typedef enum {
- GN_Blat1, GN_0decgraf, GN_Ucp437, GN_Kuser, GN_dunno, GN_dontCare
+ GN_Blat1, /* Latin-1 */
+ GN_0decgraf, /* VT100 graphics */
+ GN_Ucp437, /* PC -> PC */
+ GN_Kuser, /* user-defined */
+ GN_dunno,
+ GN_dontCare
} TTransT_t;
-static char *T_font_fn = NULL;
-static char *T_umap_fn = NULL;
+static char *T_font_fn = NULL; /* font filename */
+static char *T_umap_fn = NULL; /* unicode-map filename */
-#define SETFONT "setfont"
#define NOOUTPUT "2>/dev/null >/dev/null"
/*
+ * Return the configured path of the setfont/consolechars program.
+ */
+static const char *GetSetfontPath(void)
+{
+ return HTGetProgramPath(ppSETFONT);
+}
+
+/*
+ * setfont and consolechars have different options and available data.
+ */
+static BOOL isSetFont(void)
+{
+ const char *program = GetSetfontPath();
+ const char *slash = strrchr(program, '/');
+ const char *leaf = (slash ? slash + 1 : program);
+
+ return !strcmp(leaf, "setfont");
+}
+
+/*
+ * Here are the differences in options which affect lynx:
+ */
+#define setfont_u() (isSetFont() ? "-u " : "--sfm ")
+#define setfont_o() (isSetFont() ? "-o " : "--old-font-raw ")
+#define setfont_ou() (isSetFont() ? "-ou " : "--old-sfm ")
+#define console_font() (isSetFont() ? "" : "--font ")
+
+/*
* call_setfont - execute "setfont" command via system()
* returns: 0 ok (as far as we know)
* -1 error (assume font and umap are not loaded)
@@ -75,9 +122,16 @@ static int call_setfont(const char *font,
const char *fnsuffix,
const char *umap)
{
+ const char *program = GetSetfontPath();
char *T_setfont_cmd = NULL;
int rv;
+ /*
+ * console-data package has only a few unicode maps.
+ */
+ if (!isSetFont())
+ umap = 0;
+
if ((font && T_font_fn && !strcmp(font, T_font_fn))
&& (umap && T_umap_fn && !strcmp(umap, T_umap_fn))) {
/*
@@ -93,33 +147,42 @@ static int call_setfont(const char *font,
if (!*fnsuffix)
fnsuffix = "";
- if (umap && *umap && font && *font) {
- HTSprintf0(&T_setfont_cmd, "%s %s%s -u %s %s",
- SETFONT, font, fnsuffix, umap, NOOUTPUT);
- } else if (font && *font) {
+ if (non_empty(umap) && non_empty(font)) {
+ HTSprintf0(&T_setfont_cmd, "%s %s%s%s %s%s %s",
+ program,
+ console_font(), font, fnsuffix,
+ setfont_u(), umap,
+ NOOUTPUT);
+ } else if (non_empty(font)) {
+ HTSprintf0(&T_setfont_cmd, "%s %s%s%s %s",
+ program,
+ console_font(), font, fnsuffix,
+ NOOUTPUT);
+ } else if (non_empty(umap)) {
HTSprintf0(&T_setfont_cmd, "%s %s%s %s",
- SETFONT, font, fnsuffix, NOOUTPUT);
- } else if (umap && *umap) {
- HTSprintf0(&T_setfont_cmd, "%s -u %s %s",
- SETFONT, umap, NOOUTPUT);
+ program,
+ setfont_u(), umap,
+ NOOUTPUT);
}
if (T_setfont_cmd) {
- CTRACE((tfp, "Executing setfont: '%s'\n", T_setfont_cmd));
+ CTRACE((tfp, "Changing font: '%s'\n", T_setfont_cmd));
rv = LYSystem(T_setfont_cmd);
FREE(T_setfont_cmd);
if (rv) {
CTRACE((tfp, "call_setfont: system returned %d (0x%x)!\n",
rv, rv));
- if ((rv == 0x4200 || rv == 0x4100) && umap && *umap)
+ if ((rv == (EX_DATAERR << 8) ||
+ rv == (EX_NOINPUT << 8)) &&
+ non_empty(umap)) {
/*
- * It seems setfont returns 65 or 66 to the shell if
- * the font was loaded ok but something was wrong with
- * the umap file. - kw
+ * Check if the font was loaded ok but something was wrong with
+ * the umap file.
*/
return 1;
- else
+ } else {
return -1;
+ }
}
}
return 0;
@@ -144,12 +207,25 @@ static int nonempty_file(const char *p)
(sb.st_size != 0));
}
+static BOOL on_console(void)
+{
+ if ((x_display != NULL) ||
+ LYgetXDisplay() != NULL) {
+ /*
+ * We won't do anything in an xterm. Better that way...
+ */
+ return FALSE;
+ }
+ return TRUE;
+}
+
/*
* This is the thing that actually gets called from display_page().
*/
void UCChangeTerminalCodepage(int newcs,
LYUCcharset *p)
{
+ const char *program = GetSetfontPath();
static int lastcs = -1;
static const char *lastname = NULL;
static TTransT_t lastTransT = GN_dunno;
@@ -168,25 +244,41 @@ void UCChangeTerminalCodepage(int newcs,
char *tmpbuf2 = NULL;
int status = 0;
+ if (!on_console()) return;
+
+#ifdef HAVE_USE_LEGACY_CODING
+ if (newcs < 0) {
+ use_legacy_coding(original_coding);
+ } else {
+ original_coding = use_legacy_coding(2);
+ }
+#endif
+
/*
* Restore the original character set.
*/
if (newcs < 0 || p == 0) {
- if (old_font && *old_font &&
- old_umap && *old_umap) {
- int have_font = nonempty_file(old_font);
- int have_umap = nonempty_file(old_umap);
-
- if (have_font) {
- if (have_umap) {
- HTSprintf0(&tmpbuf1, "%s %s -u %s %s",
- SETFONT, old_font, old_umap, NOOUTPUT);
+ if (non_empty(old_font) &&
+ non_empty(old_umap)) {
+
+ if (nonempty_file(old_font)) {
+ if (nonempty_file(old_umap)) {
+ HTSprintf0(&tmpbuf1, "%s %s%s %s%s %s",
+ program,
+ console_font(), old_font,
+ setfont_u(), old_umap,
+ NOOUTPUT);
} else {
- HTSprintf0(&tmpbuf1, "%s %s %s",
- SETFONT, old_font, NOOUTPUT);
+ HTSprintf0(&tmpbuf1, "%s %s%s %s",
+ program,
+ console_font(), old_font,
+ NOOUTPUT);
}
- CTRACE((tfp, "Executing setfont to restore: '%s'\n", tmpbuf1));
+ CTRACE((tfp, "Restoring font: '%s'\n", tmpbuf1));
status = LYSystem(tmpbuf1);
+ if (status != 0) {
+ CTRACE((tfp, "...system returned %d (0x%x)\n", status, status));
+ }
FREE(tmpbuf1);
}
}
@@ -208,29 +300,38 @@ void UCChangeTerminalCodepage(int newcs,
} else if (lastcs < 0 && old_umap == 0 && old_font == 0) {
FILE *fp1;
FILE *fp2 = NULL;
- if ((old_font = typecallocn(char, LY_MAXPATH)))
+
+ if ((old_font = typecallocn(char, LY_MAXPATH)) != 0)
old_umap = typecallocn(char, LY_MAXPATH);
- if ((fp1 = LYOpenTemp(old_font, ".fnt", BIN_W)))
+ if ((fp1 = LYOpenTemp(old_font, ".fnt", BIN_W)) != 0)
fp2 = LYOpenTemp(old_umap, ".uni", BIN_W);
+
if (fp1 && fp2) {
size_t nlen;
- char *rp;
-
- HTSprintf0(&tmpbuf1, "%s -o %s -ou %s %s",
- SETFONT, old_font, old_umap, NOOUTPUT);
- CTRACE((tfp, "Executing setfont to save: '%s'\n", tmpbuf1));
- LYSystem(tmpbuf1);
+ int rv;
+
+ HTSprintf0(&tmpbuf1, "%s %s%s %s%s %s",
+ program,
+ setfont_o(), old_font,
+ setfont_ou(), old_umap,
+ NOOUTPUT);
+
+ CTRACE((tfp, "Saving font: '%s'\n", tmpbuf1));
+ rv = LYSystem(tmpbuf1);
+ if (rv != 0) {
+ CTRACE((tfp, "...system returned %d (0x%x)\n", rv, rv));
+ }
FREE(tmpbuf1);
LYCloseTempFP(fp1);
LYCloseTempFP(fp2);
- if ((nlen = strlen(old_font)) + 1 < LY_MAXPATH &&
- (rp = typeRealloc(char, old_font, nlen + 1)))
- old_font = rp;
- if ((nlen = strlen(old_umap)) + 1 < LY_MAXPATH &&
- (rp = typeRealloc(char, old_umap, nlen + 1)))
- old_umap = rp;
+ /* free up a few bytes */
+ if ((nlen = strlen(old_font) + 1) < LY_MAXPATH)
+ old_font = typeRealloc(char, old_font, nlen);
+
+ if ((nlen = strlen(old_umap) + 1) < LY_MAXPATH)
+ old_umap = typeRealloc(char, old_umap, nlen);
} else {
if (fp1)
LYRemoveTemp(old_font);
@@ -251,27 +352,16 @@ void UCChangeTerminalCodepage(int newcs,
#define SUFF3 "-8x16"
#define SUFF4 "8x16"
#define SUFF5 ".cp -16"
-
- /*
- * Use this for output of escape sequences.
- */
- if ((x_display != NULL) ||
- LYgetXDisplay() != NULL) {
- /*
- * We won't do anything in an xterm. Better that way...
- */
- return;
- }
+#define SUFF6 "_8x16"
/* NOTE: `!!umap not in kbd!!' comments below means that the *.uni file
- is not found in kbd package. Reference Debian Package: kbd-data,
- Version: 0.96a-14. They should be located elsewhere or generated.
- Also some cpNNN fonts used below are not in the kbd-data. - kw
+ * is not found in kbd package. Reference Debian Package: kbd-data,
+ * Version: 0.96a-14. They should be located elsewhere or generated.
+ * Also some cpNNN fonts used below are not in the kbd-data. - kw
*/
if (!strncmp(name, "iso-8859-1", 10) &&
- (!name[10] || !isdigit(UCH(name[10])))
- ) {
+ (!name[10] || !isdigit(UCH(name[10])))) {
if ((lastHasUmap == Is_Set) && !strcmp(lastname, "cp850")) {
/*
* cp850 already contains all latin1 characters.
@@ -324,8 +414,18 @@ void UCChangeTerminalCodepage(int newcs,
} else if (!strcmp(name, "koi8-r")) {
/*
* "setfont koi8-8x16"
+ * !!umap not in kbd!!
*/
- status = call_setfont("koi8", SUFF3, "koi8r.uni"); /* !!umap not in kbd!! */
+ status = call_setfont("koi8", SUFF3, "koi8r.uni");
+ TransT = GN_Kuser;
+ HasUmap = Is_Set;
+ Utf = Is_Unset;
+ } else if (!strcmp(name, "koi8-u")) {
+ /*
+ * "setfont koi8u_8x16"
+ * !!umap not in kbd!!
+ */
+ status = call_setfont("koi8u", SUFF6, "koi8u.uni");
TransT = GN_Kuser;
HasUmap = Is_Set;
Utf = Is_Unset;
@@ -343,8 +443,9 @@ void UCChangeTerminalCodepage(int newcs,
} else if (!strcmp(name, "cp850")) {
/*
* "setfont cp850-8x16 -u cp850.uni"
+ * !!umap not in kbd!!
*/
- status = call_setfont("cp850", SUFF3, "cp850.uni"); /* !!umap not in kbd!! */
+ status = call_setfont("cp850", SUFF3, "cp850.uni");
TransT = GN_Kuser;
HasUmap = Is_Set;
Utf = Is_Unset;
@@ -354,8 +455,9 @@ void UCChangeTerminalCodepage(int newcs,
HTSprintf0(&tmpbuf2, "%s.uni", name);
/*
* "setfont cpNNN.f16"
+ * !!umap not in kbd!!
*/
- status = call_setfont(name, SUFF1, tmpbuf2); /* !!umap not in kbd!! */
+ status = call_setfont(name, SUFF1, tmpbuf2);
FREE(tmpbuf2);
TransT = GN_Kuser;
HasUmap = Is_Set;
@@ -363,8 +465,18 @@ void UCChangeTerminalCodepage(int newcs,
} else if (!strcmp(name, "cp737")) {
/*
* "setfont cp737.cp"
+ * !!umap not in kbd!!
*/
- status = call_setfont("737", SUFF5, "cp737.uni"); /* !!umap not in kbd!! */
+ if (isSetFont()) {
+ status = call_setfont("737", SUFF5, "cp737.uni");
+ } else {
+ status = call_setfont("greek", "", "cp737.uni");
+ }
+ TransT = GN_Kuser;
+ HasUmap = Is_Set;
+ Utf = Is_Unset;
+ } else if (!strcmp(name, "cp857")) {
+ status = call_setfont("cp857", SUFF3, "cp857.uni");
TransT = GN_Kuser;
HasUmap = Is_Set;
Utf = Is_Unset;
@@ -449,6 +561,14 @@ void UCChangeTerminalCodepage(int newcs,
#ifdef __EMX__
int res = 0;
+#ifdef HAVE_USE_LEGACY_CODING
+ if (newcs < 0) {
+ use_legacy_coding(original_coding);
+ } else {
+ original_coding = use_legacy_coding(2);
+ }
+#endif
+
if (newcs < 0)
newcs = auto_display_charset;
res = Switch_Display_Charset(newcs, SWITCH_DISPLAY_CHARSET_REALLY);
@@ -667,14 +787,7 @@ int Switch_Display_Charset(const int ord, const enum switch_display_charset_t re
int res;
static int repeated;
- if (!switch_display_charsets
- && (really == SWITCH_DISPLAY_CHARSET_MAYBE
-#ifdef SWITCH_DISPLAY_CHARSET_NOT_NEEDED_ANY_MORE
- /* The first switch is not due to an interactive action */
- || (really == SWITCH_DISPLAY_CHARSET_REALLY
- && !(repeated++))
-#endif
- ))
+ if (!switch_display_charsets)
return 0;
res = _Switch_Display_Charset(ord, really);
if (res < 0 || prev == res) /* No change */
diff --git a/src/UCAux.c b/src/UCAux.c
index e5d01147..d0817260 100644
--- a/src/UCAux.c
+++ b/src/UCAux.c
@@ -308,29 +308,56 @@ void UCTransParams_clear(UCTransParams * pT)
}
/*
- * If terminal is in UTF-8 mode, it probably cannot understand
- * box drawing chars as (n)curses handles them. (This may also
- * be true for other display character sets, but isn't currently
- * checked.) In that case set the chars for hori and vert drawing
- * chars to displayable ASCII chars if '0' was requested. They'll
- * stay as they are otherwise. - kw
+ * If terminal is in UTF-8 mode, it probably cannot understand box drawing
+ * chars as the 8-bit (n)curses handles them. (This may also be true for other
+ * display character sets, but isn't currently checked.) In that case set the
+ * chars for horizontal and vertical drawing chars to displayable ASCII chars
+ * if '0' was requested. They'll stay as they are otherwise. -KW, TD
+ *
+ * If we're able to obtain a character set based on the locale settings,
+ * assume that the user has setup $TERM and the fonts already so line-drawing
+ * works.
*/
-void UCSetBoxChars(int cset GCC_UNUSED,
+void UCSetBoxChars(int cset,
int *pvert_out,
int *phori_out,
int vert_in,
int hori_in)
{
+ BOOL fix_lines = FALSE;
+
+ if (cset >= 0) {
#ifndef WIDEC_CURSES
- if (cset >= -1 && LYCharSet_UC[cset].enc == UCT_ENC_UTF8) {
- *pvert_out = (vert_in ? vert_in : '|');
- *phori_out = (hori_in ? hori_in : '-');
- } else
+ if (LYCharSet_UC[cset].enc == UCT_ENC_UTF8) {
+ fix_lines = TRUE;
+ }
#endif
- {
- *pvert_out = vert_in;
- *phori_out = hori_in;
+ /*
+ * If we've identified a charset that works, require it.
+ * This is important if we have loaded a font, which would
+ * confuse curses.
+ */
+#ifdef EXP_CHARTRANS_AUTOSWITCH
+ if (linedrawing_char_set >= 0) {
+ /* US-ASCII vs Latin-1 is safe (usually) */
+ if (cset == US_ASCII && linedrawing_char_set == LATIN1) {
+ ;
+ } else if (cset == LATIN1 && linedrawing_char_set == US_ASCII) {
+ ;
+ } else if (cset != linedrawing_char_set) {
+ fix_lines = TRUE;
+ }
+ }
+#endif
+ }
+ if (fix_lines) {
+ if (!vert_in)
+ vert_in = '|';
+ if (!hori_in)
+ hori_in = '-';
}
+ *pvert_out = vert_in;
+ *phori_out = hori_in;
}
/*
diff --git a/src/UCdomap.c b/src/UCdomap.c
index a03a4b92..febd348e 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -50,6 +50,7 @@
#include <cp775_uni.h> /* DosBaltRim (cp775) */
#include <cp850_uni.h> /* DosLatin1 (cp850) */
#include <cp852_uni.h> /* DosLatin2 (cp852) */
+#include <cp857_uni.h> /* DosTurkish (cp857) */
#include <cp862_uni.h> /* DosHebrew (cp862) */
#include <cp864_uni.h> /* DosArabic (cp864) */
#include <cp866_uni.h> /* DosCyrillic (cp866) */
@@ -67,6 +68,8 @@
#include <iso08_uni.h> /* ISO 8859-8 Hebrew */
#include <iso09_uni.h> /* ISO 8859-9 (Latin 5) */
#include <iso10_uni.h> /* ISO 8859-10 */
+#include <iso13_uni.h> /* ISO 8859-13 (Latin 7) */
+#include <iso14_uni.h> /* ISO 8859-14 (Latin 8) */
#include <iso15_uni.h> /* ISO 8859-15 (Latin 9) */
#include <koi8r_uni.h> /* KOI8-R Cyrillic */
#include <mac_uni.h> /* Macintosh (8 bit) */
@@ -1574,6 +1577,9 @@ int UCGetLYhndl_byMIME(const char *value)
return UCGetLYhndl_byMIME("koi8-r");
}
#endif
+ if (!strcasecomp(value, "ANSI_X3.4-1968")) {
+ return US_ASCII;
+ }
/* no more synonyms if come here... */
CTRACE((tfp, "UCGetLYhndl_byMIME: unrecognized MIME name \"%s\"\n", value));
@@ -2040,6 +2046,7 @@ static void UCcleanup_mem(void)
}
#endif /* LY_FIND_LEAKS */
+#ifdef EXP_CHARTRANS_AUTOSWITCH
#ifdef CAN_AUTODETECT_DISPLAY_CHARSET
# ifdef __EMX__
static int CpOrdinal(const unsigned long cp, const int other)
@@ -2080,6 +2087,7 @@ static int CpOrdinal(const unsigned long cp, const int other)
}
# endif /* __EMX__ */
#endif /* CAN_AUTODETECT_DISPLAY_CHARSET */
+#endif /* EXP_CHARTRANS_AUTOSWITCH */
void UCInit(void)
{
@@ -2123,8 +2131,10 @@ void UCInit(void)
UC_CHARSET_SETUP_iso_8859_2; /* ISO Latin 2 */
UC_CHARSET_SETUP_cp852; /* DosLatin2 (cp852) */
UC_CHARSET_SETUP_windows_1250; /* WinLatin2 (cp1250) */
+
UC_CHARSET_SETUP_iso_8859_3; /* ISO Latin 3 */
UC_CHARSET_SETUP_iso_8859_4; /* ISO Latin 4 */
+ UC_CHARSET_SETUP_iso_8859_13; /* ISO 8859-13 Baltic Rim */
UC_CHARSET_SETUP_cp775; /* DosBaltRim (cp775) */
UC_CHARSET_SETUP_windows_1257; /* WinBaltRim (cp1257) */
UC_CHARSET_SETUP_iso_8859_5; /* ISO 8859-5 Cyrillic */
@@ -2134,6 +2144,7 @@ void UCInit(void)
UC_CHARSET_SETUP_iso_8859_6; /* ISO 8869-6 Arabic */
UC_CHARSET_SETUP_cp864; /* DosArabic (cp864) */
UC_CHARSET_SETUP_windows_1256; /* WinArabic (cp1256) */
+ UC_CHARSET_SETUP_iso_8859_14; /* ISO 8859-14 Celtic */
UC_CHARSET_SETUP_iso_8859_7; /* ISO 8859-7 Greek */
UC_CHARSET_SETUP_cp737; /* DosGreek (cp737) */
UC_CHARSET_SETUP_cp869; /* DosGreek2 (cp869) */
@@ -2142,7 +2153,8 @@ void UCInit(void)
UC_CHARSET_SETUP_cp862; /* DosHebrew (cp862) */
UC_CHARSET_SETUP_windows_1255; /* WinHebrew (cp1255) */
UC_CHARSET_SETUP_iso_8859_9; /* ISO 8859-9 (Latin 5) */
- UC_CHARSET_SETUP_iso_8859_10; /* ISO 8859-10 */
+ UC_CHARSET_SETUP_cp857; /* DosTurkish (cp857) */
+ UC_CHARSET_SETUP_iso_8859_10; /* ISO 8859-10 North European */
UC_CHARSET_SETUP_utf_8; /*** UNICODE UTF-8 */
UC_CHARSET_SETUP_mnemonic_ascii_0; /* RFC 1345 w/o Intro */
@@ -2151,6 +2163,7 @@ void UCInit(void)
UC_CHARSET_SETUP_koi8_u; /* Ukrainian Cyrillic (koi8-u) */
UC_CHARSET_SETUP_ptcp154; /* Cyrillic-Asian (PT154) */
+#ifdef EXP_CHARTRANS_AUTOSWITCH
#ifdef CAN_AUTODETECT_DISPLAY_CHARSET
# ifdef __EMX__
{
@@ -2174,6 +2187,7 @@ void UCInit(void)
}
# endif
#endif
+#endif
/*
* To add synonyms for any charset name check function UCGetLYhndl_byMIME in
@@ -2364,21 +2378,28 @@ static char *nl_langinfo(nl_item item)
*/
void LYFindLocaleCharset(void)
{
+ BOOL found = FALSE;
+ char *name;
+
CTRACE((tfp, "LYFindLocaleCharset(%d)\n", LYLocaleCharset));
- if (LYLocaleCharset) {
- char *name = nl_langinfo(CODESET);
+ name = nl_langinfo(CODESET);
- if (name != 0) {
- int value = UCGetLYhndl_byMIME(name);
+ if (name != 0) {
+ int value = UCGetLYhndl_byMIME(name);
- if (value >= 0) {
- current_char_set = value;
- } else {
- CTRACE((tfp, "Cannot find a handle for MIME name \"%s\"\n", name));
- }
+ if (value >= 0) {
+ found = TRUE;
+ linedrawing_char_set = value;
+ CTRACE((tfp, "Found name \"%s\" -> %d\n", name, value));
} else {
- CTRACE((tfp, "Cannot find a MIME name for locale\n"));
+ CTRACE((tfp, "Cannot find a handle for MIME name \"%s\"\n", name));
}
+ } else {
+ CTRACE((tfp, "Cannot find a MIME name for locale\n"));
+ }
+
+ if (found && LYLocaleCharset) {
+ current_char_set = linedrawing_char_set;
}
}
#endif /* EXP_LOCALE_CHARSET */
diff --git a/src/chrtrans/build-chrtrans.com b/src/chrtrans/build-chrtrans.com
index 11e44c02..c4f88f59 100644
--- a/src/chrtrans/build-chrtrans.com
+++ b/src/chrtrans/build-chrtrans.com
@@ -97,6 +97,7 @@ $ makeuctb cp737_uni.tbl
$ makeuctb cp775_uni.tbl
$ makeuctb cp850_uni.tbl
$ makeuctb cp852_uni.tbl
+$ makeuctb cp857_uni.tbl
$ makeuctb cp862_uni.tbl
$ makeuctb cp864_uni.tbl
$ makeuctb cp866_uni.tbl
@@ -115,6 +116,8 @@ $ makeuctb iso07_uni.tbl
$ makeuctb iso08_uni.tbl
$ makeuctb iso09_uni.tbl
$ makeuctb iso10_uni.tbl
+$ makeuctb iso13_uni.tbl
+$ makeuctb iso14_uni.tbl
$ makeuctb iso15_uni.tbl
$ makeuctb koi8r_uni.tbl
$ makeuctb koi8u_uni.tbl
diff --git a/src/chrtrans/cp857_uni.tbl b/src/chrtrans/cp857_uni.tbl
new file mode 100644
index 00000000..bf6a6be4
--- /dev/null
+++ b/src/chrtrans/cp857_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset.
+Mcp857
+
+#Name as a Display Charset (used on Options screen).
+OTurkish (cp857)
+
+#Codepage number
+C857
+
+# Name: cp857_DOSTurkish to Unicode table
+# Unicode version: 2.0
+# Table version: 2.00
+# Table format: Format A
+# Date: 04/24/96
+# Authors: Lori Brownell <loribr@microsoft.com>
+# K.D. Chang <a-kchang@microsoft.com>
+# General notes: none
+#
+# Format: Three tab-separated columns
+# Column #1 is the cp857_DOSTurkish code (in hex)
+# Column #2 is the Unicode (in hex as 0xXXXX)
+# Column #3 is the Unicode name (follows a comment sign, '#')
+#
+# The entries are in cp857_DOSTurkish order
+#
+##################
+
+0x20-0x7f idem
+
+0x80 U+00c7 #LATIN CAPITAL LETTER C WITH CEDILLA
+0x81 U+00fc #LATIN SMALL LETTER U WITH DIAERESIS
+0x82 U+00e9 #LATIN SMALL LETTER E WITH ACUTE
+0x83 U+00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX
+0x84 U+00e4 #LATIN SMALL LETTER A WITH DIAERESIS
+0x85 U+00e0 #LATIN SMALL LETTER A WITH GRAVE
+0x86 U+00e5 #LATIN SMALL LETTER A WITH RING ABOVE
+0x87 U+00e7 #LATIN SMALL LETTER C WITH CEDILLA
+0x88 U+00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX
+0x89 U+00eb #LATIN SMALL LETTER E WITH DIAERESIS
+0x8a U+00e8 #LATIN SMALL LETTER E WITH GRAVE
+0x8b U+00ef #LATIN SMALL LETTER I WITH DIAERESIS
+0x8c U+00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX
+0x8d U+0131 #LATIN SMALL LETTER DOTLESS I
+0x8e U+00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS
+0x8f U+00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE
+0x90 U+00c9 #LATIN CAPITAL LETTER E WITH ACUTE
+0x91 U+00e6 #LATIN SMALL LIGATURE AE
+0x92 U+00c6 #LATIN CAPITAL LIGATURE AE
+0x93 U+00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX
+0x94 U+00f6 #LATIN SMALL LETTER O WITH DIAERESIS
+0x95 U+00f2 #LATIN SMALL LETTER O WITH GRAVE
+0x96 U+00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX
+0x97 U+00f9 #LATIN SMALL LETTER U WITH GRAVE
+0x98 U+0130 #LATIN CAPITAL LETTER I WITH DOT ABOVE
+0x99 U+00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS
+0x9a U+00dc #LATIN CAPITAL LETTER U WITH DIAERESIS
+0x9b U+00f8 #LATIN SMALL LETTER O WITH STROKE
+0x9c U+00a3 #POUND SIGN
+0x9d U+00d8 #LATIN CAPITAL LETTER O WITH STROKE
+0x9e U+015e #LATIN CAPITAL LETTER S WITH CEDILLA
+0x9f U+015f #LATIN SMALL LETTER S WITH CEDILLA
+0xa0 U+00e1 #LATIN SMALL LETTER A WITH ACUTE
+0xa1 U+00ed #LATIN SMALL LETTER I WITH ACUTE
+0xa2 U+00f3 #LATIN SMALL LETTER O WITH ACUTE
+0xa3 U+00fa #LATIN SMALL LETTER U WITH ACUTE
+0xa4 U+00f1 #LATIN SMALL LETTER N WITH TILDE
+0xa5 U+00d1 #LATIN CAPITAL LETTER N WITH TILDE
+0xa6 U+011e #LATIN CAPITAL LETTER G WITH BREVE
+0xa7 U+011f #LATIN SMALL LETTER G WITH BREVE
+0xa8 U+00bf #INVERTED QUESTION MARK
+0xa9 U+00ae #REGISTERED SIGN
+0xaa U+00ac #NOT SIGN
+0xab U+00bd #VULGAR FRACTION ONE HALF
+0xac U+00bc #VULGAR FRACTION ONE QUARTER
+0xad U+00a1 #INVERTED EXCLAMATION MARK
+0xae U+00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xaf U+00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xb0 U+2591 #LIGHT SHADE
+0xb1 U+2592 #MEDIUM SHADE
+0xb2 U+2593 #DARK SHADE
+0xb3 U+2502 #BOX DRAWINGS LIGHT VERTICAL
+0xb4 U+2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT
+0xb5 U+00c1 #LATIN CAPITAL LETTER A WITH ACUTE
+0xb6 U+00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xb7 U+00c0 #LATIN CAPITAL LETTER A WITH GRAVE
+0xb8 U+00a9 #COPYRIGHT SIGN
+0xb9 U+2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT
+0xba U+2551 #BOX DRAWINGS DOUBLE VERTICAL
+0xbb U+2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT
+0xbc U+255d #BOX DRAWINGS DOUBLE UP AND LEFT
+0xbd U+00a2 #CENT SIGN
+0xbe U+00a5 #YEN SIGN
+0xbf U+2510 #BOX DRAWINGS LIGHT DOWN AND LEFT
+0xc0 U+2514 #BOX DRAWINGS LIGHT UP AND RIGHT
+0xc1 U+2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL
+0xc2 U+252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+0xc3 U+251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+0xc4 U+2500 #BOX DRAWINGS LIGHT HORIZONTAL
+0xc5 U+253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+0xc6 U+00e3 #LATIN SMALL LETTER A WITH TILDE
+0xc7 U+00c3 #LATIN CAPITAL LETTER A WITH TILDE
+0xc8 U+255a #BOX DRAWINGS DOUBLE UP AND RIGHT
+0xc9 U+2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT
+0xca U+2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL
+0xcb U+2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
+0xcc U+2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
+0xcd U+2550 #BOX DRAWINGS DOUBLE HORIZONTAL
+0xce U+256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
+0xcf U+00a4 #CURRENCY SIGN
+0xd0 U+00ba #MASCULINE ORDINAL INDICATOR
+0xd1 U+00aa #FEMININE ORDINAL INDICATOR
+0xd2 U+00ca #LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+0xd3 U+00cb #LATIN CAPITAL LETTER E WITH DIAERESIS
+0xd4 U+00c8 #LATIN CAPITAL LETTER E WITH GRAVE
+0xd5 #UNDEFINED
+0xd6 U+00cd #LATIN CAPITAL LETTER I WITH ACUTE
+0xd7 U+00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xd8 U+00cf #LATIN CAPITAL LETTER I WITH DIAERESIS
+0xd9 U+2518 #BOX DRAWINGS LIGHT UP AND LEFT
+0xda U+250c #BOX DRAWINGS LIGHT DOWN AND RIGHT
+0xdb U+2588 #FULL BLOCK
+0xdc U+2584 #LOWER HALF BLOCK
+0xdd U+00a6 #BROKEN BAR
+0xde U+00cc #LATIN CAPITAL LETTER I WITH GRAVE
+0xdf U+2580 #UPPER HALF BLOCK
+0xe0 U+00d3 #LATIN CAPITAL LETTER O WITH ACUTE
+0xe1 U+00df #LATIN SMALL LETTER SHARP S
+0xe2 U+00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xe3 U+00d2 #LATIN CAPITAL LETTER O WITH GRAVE
+0xe4 U+00f5 #LATIN SMALL LETTER O WITH TILDE
+0xe5 U+00d5 #LATIN CAPITAL LETTER O WITH TILDE
+0xe6 U+00b5 #MICRO SIGN
+0xe7 #UNDEFINED
+0xe8 U+00d7 #MULTIPLICATION SIGN
+0xe9 U+00da #LATIN CAPITAL LETTER U WITH ACUTE
+0xea U+00db #LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+0xeb U+00d9 #LATIN CAPITAL LETTER U WITH GRAVE
+0xec U+00ec #LATIN SMALL LETTER I WITH GRAVE
+0xed U+00ff #LATIN SMALL LETTER Y WITH DIAERESIS
+0xee U+00af #MACRON
+0xef U+00b4 #ACUTE ACCENT
+0xf0 U+00ad #SOFT HYPHEN
+0xf1 U+00b1 #PLUS-MINUS SIGN
+0xf2 #UNDEFINED
+0xf3 U+00be #VULGAR FRACTION THREE QUARTERS
+0xf4 U+00b6 #PILCROW SIGN
+0xf5 U+00a7 #SECTION SIGN
+0xf6 U+00f7 #DIVISION SIGN
+0xf7 U+00b8 #CEDILLA
+0xf8 U+00b0 #DEGREE SIGN
+0xf9 U+00a8 #DIAERESIS
+0xfa U+00b7 #MIDDLE DOT
+0xfb U+00b9 #SUPERSCRIPT ONE
+0xfc U+00b3 #SUPERSCRIPT THREE
+0xfd U+00b2 #SUPERSCRIPT TWO
+0xfe U+25a0 #BLACK SQUARE
+0xff U+00a0 #NO-BREAK SPACE
diff --git a/src/chrtrans/iso10_uni.tbl b/src/chrtrans/iso10_uni.tbl
index 28c3dd3b..4c6605c8 100644
--- a/src/chrtrans/iso10_uni.tbl
+++ b/src/chrtrans/iso10_uni.tbl
@@ -10,114 +10,144 @@ D0
Miso-8859-10
#Name as a Display Charset (used on Options screen)
-OISO-8859-10
+ONorth European (ISO-8859-10)
+
+# Name: ISO 8859-10 Latin 6 (1998) to Unicode
+# Date: 2005-12-15
+# Authors: Thomas E Dickey from
+# http://czyborra.com/charsets/iso8859.html
+# (ISO 8859 Alphabet Soup)
0x20-0x7e idem
-#0x7f U+2302
-#
-#0x00 U+fffd
-#0x01 U+263A
-#0x02 U+263B
-#0x03 U+2665
-#0x04 U+2666
-#0x05 U+2663
-#0x06 U+2660
-#0x07 U+2022
-#0x08 U+25D8
-#0x09 U+25CB
-#0x0A U+25D9
-#0x0B U+2642
-#0x0C U+2640
-#0x0D U+266A
-#0x0E U+266B
-#0x0E U+266C
-#0x0F U+263C
-#0x10 U+25B6
-#0x10 U+25BA
-#0x11 U+25C0
-#0x11 U+25C4
-#0x12 U+2195
-#0x13 U+203C
-#0x14 U+00B6
-#0x15 U+00A7
-#0x16 U+25AC
-#0x17 U+21A8
-#0x18 U+2191
-#0x19 U+2193
-#0x1A U+2192
-#0x1B U+2190
-#0x1C U+221F
-#0x1C U+2319
-#0x1D U+2194
-#0x1E U+25B2
-#0x1F U+25BC
-#
-0xa0 U+00a0
-0xa1 U+0104
-0xa2 U+0112
-0xa3 U+0122
-0xa4 U+012a
-0xa5 U+0128
-0xa6 U+0136
-0xa7 U+013b
-0xa8 U+0143
-0xa9 U+0156
-0xaa U+0160
-0xab U+0166
-0xac U+017d
-0xad U+00ad
-0xae U+0138
-0xaf U+014a
-0xb0 U+0111
-0xb1 U+0105
-0xb2 U+0113
-0xb3 U+0123
-0xb4 U+012b
-0xb5 U+0129
-0xb6 U+0137
-0xb7 U+013c
-0xb8 U+0144
-0xb9 U+0157
-0xba U+0161
-0xbb U+0167
-0xbc U+017e
-0xbd U+2015 # HORIZONTAL BAR
-0xbe U+00df
-0xbf U+014b
-0xc0 U+0100
+
+0xa0 U+00a0 # NO-BREAK SPACE
+0xa1 U+0104 # LATIN CAPITAL LETTER A WITH OGONEK
+0xa2 U+0112 # LATIN CAPITAL LETTER E WITH MACRON
+0xa3 U+0122 # LATIN CAPITAL LETTER G WITH CEDILLA
+0xa4 U+012a # LATIN CAPITAL LETTER I WITH MACRON
+0xa5 U+0128 # LATIN CAPITAL LETTER I WITH TILDE
+0xa6 U+0136 # LATIN CAPITAL LETTER K WITH CEDILLA
+0xa7 U+00a7 # SECTION SIGN
+0xa8 U+013b # LATIN CAPITAL LETTER L WITH CEDILLA
+0xa9 U+0110 # LATIN CAPITAL LETTER D WITH STROKE
+0xaa U+0160 # LATIN CAPITAL LETTER S WITH CARON
+0xab U+0166 # LATIN CAPITAL LETTER T WITH STROKE
+0xac U+017d # LATIN CAPITAL LETTER Z WITH CARON
+0xad U+00ad # SOFT HYPHEN
+0xae U+016a # LATIN CAPITAL LETTER U WITH MACRON
+0xaf U+014a # LATIN CAPITAL LETTER ENG
+0xb0 U+00b0 # DEGREE SIGN
+0xb1 U+0105 # LATIN SMALL LETTER A WITH OGONEK
+0xb2 U+0113 # LATIN SMALL LETTER E WITH MACRON
+0xb3 U+0123 # LATIN SMALL LETTER G WITH CEDILLA
+0xb4 U+012b # LATIN SMALL LETTER I WITH MACRON
+0xb5 U+0129 # LATIN SMALL LETTER I WITH TILDE
+0xb6 U+0137 # LATIN SMALL LETTER K WITH CEDILLA
+0xb7 U+00b7 # MIDDLE DOT
+0xb8 U+013c # LATIN SMALL LETTER L WITH CEDILLA
+0xb9 U+0111 # LATIN SMALL LETTER D WITH STROKE
+0xba U+0161 # LATIN SMALL LETTER S WITH CARON
+0xbb U+0167 # LATIN SMALL LETTER T WITH STROKE
+0xbc U+017e # LATIN SMALL LETTER Z WITH CARON
+0xbd U+2015 # HORIZONTAL BAR
+0xbe U+016b # LATIN SMALL LETTER U WITH MACRON
+0xbf U+014b # LATIN SMALL LETTER ENG
+0xc0 U+0100 # LATIN CAPITAL LETTER A WITH MACRON
+
0xc1-0xc6 idem
-0xc7 U+012e
-0xc8 U+010c
-0xc9 U+00c9
-0xca U+0118
-0xcb U+00cb
-0xcc U+0116
+
+#0xc1 U+00c1 # LATIN CAPITAL LETTER A WITH ACUTE
+#0xc2 U+00c2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+#0xc3 U+00c3 # LATIN CAPITAL LETTER A WITH TILDE
+#0xc4 U+00c4 # LATIN CAPITAL LETTER A WITH DIAERESIS
+#0xc5 U+00c5 # LATIN CAPITAL LETTER A WITH RING ABOVE
+#0xc6 U+00c6 # LATIN CAPITAL LETTER AE
+
+0xc7 U+012e # LATIN CAPITAL LETTER I WITH OGONEK
+0xc8 U+010c # LATIN CAPITAL LETTER C WITH CARON
+0xc9 U+00c9 # LATIN CAPITAL LETTER E WITH ACUTE
+0xca U+0118 # LATIN CAPITAL LETTER E WITH OGONEK
+0xcb U+00cb # LATIN CAPITAL LETTER E WITH DIAERESIS
+0xcc U+0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE
+
0xcd-0xd0 idem
-0xd1 U+0145
-0xd2 U+014c
+
+#0xcd U+00cd # LATIN CAPITAL LETTER I WITH ACUTE
+#0xce U+00ce # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+#0xcf U+00cf # LATIN CAPITAL LETTER I WITH DIAERESIS
+#0xd0 U+00d0 # LATIN CAPITAL LETTER ETH
+
+0xd1 U+0145 # LATIN CAPITAL LETTER N WITH CEDILLA
+0xd2 U+014c # LATIN CAPITAL LETTER O WITH MACRON
+
0xd3-0xd6 idem
-0xd7 U+0168
-0xd8 U+00d8
-0xd9 U+0172
+
+#0xd3 U+00d3 # LATIN CAPITAL LETTER O WITH ACUTE
+#0xd4 U+00d4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+#0xd5 U+00d5 # LATIN CAPITAL LETTER O WITH TILDE
+#0xd6 U+00d6 # LATIN CAPITAL LETTER O WITH DIAERESIS
+
+0xd7 U+0168 # LATIN CAPITAL LETTER U WITH TILDE
+0xd8 U+00d8 # LATIN CAPITAL LETTER O WITH STROKE
+0xd9 U+0172 # LATIN CAPITAL LETTER U WITH OGONEK
+
0xda-0xde idem
-0xdf U+016a
-0xe0 U+0101
+
+#0xda U+00da # LATIN CAPITAL LETTER U WITH ACUTE
+#0xdb U+00db # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+#0xdc U+00dc # LATIN CAPITAL LETTER U WITH DIAERESIS
+#0xdd U+00dd # LATIN CAPITAL LETTER Y WITH ACUTE
+#0xde U+00de # LATIN CAPITAL LETTER THORN
+
+0xdF U+00df # LATIN SMALL LETTER SHARP S
+0xe0 U+0101 # LATIN SMALL LETTER A WITH MACRON
+
0xe1-0xe6 idem
-0xe7 U+012f
-0xe8 U+010d
-0xe9 U+00e9
-0xea U+0119
-0xeb U+00eb
-0xec U+0117
+
+#0xe1 U+00e1 # LATIN SMALL LETTER A WITH ACUTE
+#0xe2 U+00e2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
+#0xe3 U+00e3 # LATIN SMALL LETTER A WITH TILDE
+#0xe4 U+00e4 # LATIN SMALL LETTER A WITH DIAERESIS
+#0xe5 U+00e5 # LATIN SMALL LETTER A WITH RING ABOVE
+#0xe6 U+00e6 # LATIN SMALL LETTER AE
+
+0xe7 U+012f # LATIN SMALL LETTER I WITH OGONEK
+0xe8 U+010d # LATIN SMALL LETTER C WITH CARON
+0xe9 U+00e9 # LATIN SMALL LETTER E WITH ACUTE
+0xea U+0119 # LATIN SMALL LETTER E WITH OGONEK
+0xeb U+00eb # LATIN SMALL LETTER E WITH DIAERESIS
+0xec U+0117 # LATIN SMALL LETTER E WITH DOT ABOVE
+
0xed-0xf0 idem
-0xf1 U+0146
-0xf2 U+014d
+
+#0xed U+00ed # LATIN SMALL LETTER I WITH ACUTE
+#0xee U+00ee # LATIN SMALL LETTER I WITH CIRCUMFLEX
+#0xef U+00ef # LATIN SMALL LETTER I WITH DIAERESIS
+#0xf0 U+00F0 # LATIN SMALL LETTER ETH
+
+0xf1 U+0146 # LATIN SMALL LETTER N WITH CEDILLA
+0xf2 U+014d # LATIN SMALL LETTER O WITH MACRON
+
0xf3-0xf6 idem
-0xf7 U+0169
-0xf8 U+00f8
-0xf9 U+0173
+
+#0xf3 U+00f3 # LATIN SMALL LETTER O WITH ACUTE
+#0xf4 U+00f4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
+#0xf5 U+00f5 # LATIN SMALL LETTER O WITH TILDE
+#0xf6 U+00f6 # LATIN SMALL LETTER O WITH DIAERESIS
+
+0xf7 U+0169 # LATIN SMALL LETTER U WITH TILDE
+0xf8 U+00f8 # LATIN SMALL LETTER O WITH STROKE
+0xf9 U+0173 # LATIN SMALL LETTER U WITH OGONEK
+
0xfa-0xfe idem
-0xff U+016b
+
+#0xfa U+00fa # LATIN SMALL LETTER U WITH ACUTE
+#0xfb U+00fb # LATIN SMALL LETTER U WITH CIRCUMFLEX
+#0xfc U+00fc # LATIN SMALL LETTER U WITH DIAERESIS
+#0xfd U+00fd # LATIN SMALL LETTER Y WITH ACUTE
+#0xfe U+00fe # LATIN SMALL LETTER THORN
+
+0xfF U+0138 # LATIN SMALL LETTER KRA
# TRADE MARK SIGN:
U+2122:(TM)
diff --git a/src/chrtrans/iso13_uni.tbl b/src/chrtrans/iso13_uni.tbl
new file mode 100644
index 00000000..e51ea23e
--- /dev/null
+++ b/src/chrtrans/iso13_uni.tbl
@@ -0,0 +1,114 @@
+# The MIME name of this charset.
+Miso-8859-13
+
+# Name as a Display Charset (used on Options screen)
+OBaltic Rim (ISO-8859-13)
+
+# This is not the default font!
+D0
+
+#
+# Name: ISO 8859-13 Latin 7 (1998) to Unicode
+# Date: 2005-12-15
+# Authors: Thomas E Dickey from
+# http://czyborra.com/charsets/iso8859.html
+# (ISO 8859 Alphabet Soup)
+
+0x20-0x7E idem # ASCII
+
+0xA0 U+00A0 # NO-BREAK SPACE
+0xA1 U+201D # RIGHT DOUBLE QUOTATION MARK
+0xA2 U+00A2 # CENT SIGN
+0xA3 U+00A3 # POUND SIGN
+0xA4 U+00A4 # CURRENCY SIGN
+0xA5 U+201E # DOUBLE LOW-9 QUOTATION MARK
+0xA6 U+00A6 # BROKEN BAR
+0xA7 U+00A7 # SECTION SIGN
+0xA8 U+00D8 # LATIN CAPITAL LETTER O WITH STROKE
+0xA9 U+00A9 # COPYRIGHT SIGN
+0xAA U+0156 # LATIN CAPITAL LETTER R WITH CEDILLA
+0xAB U+00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xAC U+00AC # NOT SIGN
+0xAD U+00AD # SOFT HYPHEN
+0xAE U+00AE # REGISTERED SIGN
+0xAF U+00C6 # LATIN CAPITAL LETTER AE
+0xB0 U+00B0 # DEGREE SIGN
+0xB1 U+00B1 # PLUS-MINUS SIGN
+0xB2 U+00B2 # SUPERSCRIPT TWO
+0xB3 U+00B3 # SUPERSCRIPT THREE
+0xB4 U+201C # LEFT DOUBLE QUOTATION MARK
+0xB5 U+00B5 # MICRO SIGN
+0xB6 U+00B6 # PILCROW SIGN
+0xB7 U+00B7 # MIDDLE DOT
+0xB8 U+00F8 # LATIN SMALL LETTER O WITH STROKE
+0xB9 U+00B9 # SUPERSCRIPT ONE
+0xBA U+0157 # LATIN SMALL LETTER R WITH CEDILLA
+0xBB U+00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xBC U+00BC # VULGAR FRACTION ONE QUARTER
+0xBD U+00BD # VULGAR FRACTION ONE HALF
+0xBE U+00BE # VULGAR FRACTION THREE QUARTERS
+0xBF U+00E6 # LATIN SMALL LETTER AE
+0xC0 U+0104 # LATIN CAPITAL LETTER A WITH OGONEK
+0xC1 U+012E # LATIN CAPITAL LETTER I WITH OGONEK
+0xC2 U+0100 # LATIN CAPITAL LETTER A WITH MACRON
+0xC3 U+0106 # LATIN CAPITAL LETTER C WITH ACUTE
+0xC4 U+00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
+0xC5 U+00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE
+0xC6 U+0118 # LATIN CAPITAL LETTER E WITH OGONEK
+0xC7 U+0112 # LATIN CAPITAL LETTER E WITH MACRON
+0xC8 U+010C # LATIN CAPITAL LETTER C WITH CARON
+0xC9 U+00C9 # LATIN CAPITAL LETTER E WITH ACUTE
+0xCA U+0179 # LATIN CAPITAL LETTER Z WITH ACUTE
+0xCB U+0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE
+0xCC U+0122 # LATIN CAPITAL LETTER G WITH CEDILLA
+0xCD U+0136 # LATIN CAPITAL LETTER K WITH CEDILLA
+0xCE U+012A # LATIN CAPITAL LETTER I WITH MACRON
+0xCF U+013B # LATIN CAPITAL LETTER L WITH CEDILLA
+0xD0 U+0160 # LATIN CAPITAL LETTER S WITH CARON
+0xD1 U+0143 # LATIN CAPITAL LETTER N WITH ACUTE
+0xD2 U+0145 # LATIN CAPITAL LETTER N WITH CEDILLA
+0xD3 U+00D3 # LATIN CAPITAL LETTER O WITH ACUTE
+0xD4 U+014C # LATIN CAPITAL LETTER O WITH MACRON
+0xD5 U+00D5 # LATIN CAPITAL LETTER O WITH TILDE
+0xD6 U+00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS
+0xD7 U+00D7 # MULTIPLICATION SIGN
+0xD8 U+0172 # LATIN CAPITAL LETTER U WITH OGONEK
+0xD9 U+0141 # LATIN CAPITAL LETTER L WITH STROKE
+0xDA U+015A # LATIN CAPITAL LETTER S WITH ACUTE
+0xDB U+016A # LATIN CAPITAL LETTER U WITH MACRON
+0xDC U+00DC # LATIN CAPITAL LETTER U WITH DIAERESIS
+0xDD U+017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE
+0xDE U+017D # LATIN CAPITAL LETTER Z WITH CARON
+0xDF U+00DF # LATIN SMALL LETTER SHARP S
+0xE0 U+0105 # LATIN SMALL LETTER A WITH OGONEK
+0xE1 U+012F # LATIN SMALL LETTER I WITH OGONEK
+0xE2 U+0101 # LATIN SMALL LETTER A WITH MACRON
+0xE3 U+0107 # LATIN SMALL LETTER C WITH ACUTE
+0xE4 U+00E4 # LATIN SMALL LETTER A WITH DIAERESIS
+0xE5 U+00E5 # LATIN SMALL LETTER A WITH RING ABOVE
+0xE6 U+0119 # LATIN SMALL LETTER E WITH OGONEK
+0xE7 U+0113 # LATIN SMALL LETTER E WITH MACRON
+0xE8 U+010D # LATIN SMALL LETTER C WITH CARON
+0xE9 U+00E9 # LATIN SMALL LETTER E WITH ACUTE
+0xEA U+017A # LATIN SMALL LETTER Z WITH ACUTE
+0xEB U+0117 # LATIN SMALL LETTER E WITH DOT ABOVE
+0xEC U+0123 # LATIN SMALL LETTER G WITH CEDILLA
+0xED U+0137 # LATIN SMALL LETTER K WITH CEDILLA
+0xEE U+012B # LATIN SMALL LETTER I WITH MACRON
+0xEF U+013C # LATIN SMALL LETTER L WITH CEDILLA
+0xF0 U+0161 # LATIN SMALL LETTER S WITH CARON
+0xF1 U+0144 # LATIN SMALL LETTER N WITH ACUTE
+0xF2 U+0146 # LATIN SMALL LETTER N WITH CEDILLA
+0xF3 U+00F3 # LATIN SMALL LETTER O WITH ACUTE
+0xF4 U+014D # LATIN SMALL LETTER O WITH MACRON
+0xF5 U+00F5 # LATIN SMALL LETTER O WITH TILDE
+0xF6 U+00F6 # LATIN SMALL LETTER O WITH DIAERESIS
+0xF7 U+00F7 # DIVISION SIGN
+0xF8 U+0173 # LATIN SMALL LETTER U WITH OGONEK
+0xF9 U+0142 # LATIN SMALL LETTER L WITH STROKE
+0xFA U+015B # LATIN SMALL LETTER S WITH ACUTE
+0xFB U+016B # LATIN SMALL LETTER U WITH MACRON
+0xFC U+00FC # LATIN SMALL LETTER U WITH DIAERESIS
+0xFD U+017C # LATIN SMALL LETTER Z WITH DOT ABOVE
+0xFE U+017E # LATIN SMALL LETTER Z WITH CARON
+0xFF U+2019 # RIGHT SINGLE QUOTATION MARK
diff --git a/src/chrtrans/iso14_uni.tbl b/src/chrtrans/iso14_uni.tbl
new file mode 100644
index 00000000..630a9466
--- /dev/null
+++ b/src/chrtrans/iso14_uni.tbl
@@ -0,0 +1,114 @@
+# The MIME name of this charset.
+Miso-8859-14
+
+# Name as a Display Charset (used on Options screen)
+OCeltic (ISO-8859-14)
+
+# This is not the default font!
+D0
+
+#
+# Name: ISO 8859-13 Latin 8 (1998) to Unicode
+# Date: 2005-12-15
+# Authors: Thomas E Dickey from
+# http://czyborra.com/charsets/iso8859.html
+# (ISO 8859 Alphabet Soup)
+
+0x20-0x7E idem # ASCII
+
+0xA0 U+00A0 # NO-BREAK SPACE
+0xA1 U+1E02 # LATIN CAPITAL LETTER B WITH DOT ABOVE
+0xA2 U+1E03 # LATIN SMALL LETTER B WITH DOT ABOVE
+0xA3 U+00A3 # POUND SIGN
+0xA4 U+010A # LATIN CAPITAL LETTER C WITH DOT ABOVE
+0xA5 U+010B # LATIN SMALL LETTER C WITH DOT ABOVE
+0xA6 U+1E0A # LATIN CAPITAL LETTER D WITH DOT ABOVE
+0xA7 U+00A7 # SECTION SIGN
+0xA8 U+1E80 # LATIN CAPITAL LETTER W WITH GRAVE
+0xA9 U+00A9 # COPYRIGHT SIGN
+0xAA U+1E82 # LATIN CAPITAL LETTER W WITH ACUTE
+0xAB U+1E0B # LATIN SMALL LETTER D WITH DOT ABOVE
+0xAC U+1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE
+0xAD U+00AD # SOFT HYPHEN
+0xAE U+00AE # REGISTERED SIGN
+0xAF U+0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS
+0xB0 U+1E1E # LATIN CAPITAL LETTER F WITH DOT ABOVE
+0xB1 U+1E1F # LATIN SMALL LETTER F WITH DOT ABOVE
+0xB2 U+0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE
+0xB3 U+0121 # LATIN SMALL LETTER G WITH DOT ABOVE
+0xB4 U+1E40 # LATIN CAPITAL LETTER M WITH DOT ABOVE
+0xB5 U+1E41 # LATIN SMALL LETTER M WITH DOT ABOVE
+0xB6 U+00B6 # PILCROW SIGN
+0xB7 U+1E56 # LATIN CAPITAL LETTER P WITH DOT ABOVE
+0xB8 U+1E81 # LATIN SMALL LETTER W WITH GRAVE
+0xB9 U+1E57 # LATIN SMALL LETTER P WITH DOT ABOVE
+0xBA U+1E83 # LATIN SMALL LETTER W WITH ACUTE
+0xBB U+1E60 # LATIN CAPITAL LETTER S WITH DOT ABOVE
+0xBC U+1EF3 # LATIN SMALL LETTER Y WITH GRAVE
+0xBD U+1E84 # LATIN CAPITAL LETTER W WITH DIAERESIS
+0xBE U+1E85 # LATIN SMALL LETTER W WITH DIAERESIS
+0xBF U+1E61 # LATIN SMALL LETTER S WITH DOT ABOVE
+0xC0 U+00C0 # LATIN CAPITAL LETTER A WITH GRAVE
+0xC1 U+00C1 # LATIN CAPITAL LETTER A WITH ACUTE
+0xC2 U+00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xC3 U+00C3 # LATIN CAPITAL LETTER A WITH TILDE
+0xC4 U+00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
+0xC5 U+00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE
+0xC6 U+00C6 # LATIN CAPITAL LETTER AE
+0xC7 U+00C7 # LATIN CAPITAL LETTER C WITH CEDILLA
+0xC8 U+00C8 # LATIN CAPITAL LETTER E WITH GRAVE
+0xC9 U+00C9 # LATIN CAPITAL LETTER E WITH ACUTE
+0xCA U+00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+0xCB U+00CB # LATIN CAPITAL LETTER E WITH DIAERESIS
+0xCC U+00CC # LATIN CAPITAL LETTER I WITH GRAVE
+0xCD U+00CD # LATIN CAPITAL LETTER I WITH ACUTE
+0xCE U+00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xCF U+00CF # LATIN CAPITAL LETTER I WITH DIAERESIS
+0xD0 U+0174 # LATIN CAPITAL LETTER W WITH CIRCUMFLEX
+0xD1 U+00D1 # LATIN CAPITAL LETTER N WITH TILDE
+0xD2 U+00D2 # LATIN CAPITAL LETTER O WITH GRAVE
+0xD3 U+00D3 # LATIN CAPITAL LETTER O WITH ACUTE
+0xD4 U+00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xD5 U+00D5 # LATIN CAPITAL LETTER O WITH TILDE
+0xD6 U+00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS
+0xD7 U+1E6A # LATIN CAPITAL LETTER T WITH DOT ABOVE
+0xD8 U+00D8 # LATIN CAPITAL LETTER O WITH STROKE
+0xD9 U+00D9 # LATIN CAPITAL LETTER U WITH GRAVE
+0xDA U+00DA # LATIN CAPITAL LETTER U WITH ACUTE
+0xDB U+00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+0xDC U+00DC # LATIN CAPITAL LETTER U WITH DIAERESIS
+0xDD U+00DD # LATIN CAPITAL LETTER Y WITH ACUTE
+0xDE U+0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
+0xDF U+00DF # LATIN SMALL LETTER SHARP S
+0xE0 U+00E0 # LATIN SMALL LETTER A WITH GRAVE
+0xE1 U+00E1 # LATIN SMALL LETTER A WITH ACUTE
+0xE2 U+00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
+0xE3 U+00E3 # LATIN SMALL LETTER A WITH TILDE
+0xE4 U+00E4 # LATIN SMALL LETTER A WITH DIAERESIS
+0xE5 U+00E5 # LATIN SMALL LETTER A WITH RING ABOVE
+0xE6 U+00E6 # LATIN SMALL LETTER AE
+0xE7 U+00E7 # LATIN SMALL LETTER C WITH CEDILLA
+0xE8 U+00E8 # LATIN SMALL LETTER E WITH GRAVE
+0xE9 U+00E9 # LATIN SMALL LETTER E WITH ACUTE
+0xEA U+00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX
+0xEB U+00EB # LATIN SMALL LETTER E WITH DIAERESIS
+0xEC U+00EC # LATIN SMALL LETTER I WITH GRAVE
+0xED U+00ED # LATIN SMALL LETTER I WITH ACUTE
+0xEE U+00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX
+0xEF U+00EF # LATIN SMALL LETTER I WITH DIAERESIS
+0xF0 U+0175 # LATIN SMALL LETTER W WITH CIRCUMFLEX
+0xF1 U+00F1 # LATIN SMALL LETTER N WITH TILDE
+0xF2 U+00F2 # LATIN SMALL LETTER O WITH GRAVE
+0xF3 U+00F3 # LATIN SMALL LETTER O WITH ACUTE
+0xF4 U+00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
+0xF5 U+00F5 # LATIN SMALL LETTER O WITH TILDE
+0xF6 U+00F6 # LATIN SMALL LETTER O WITH DIAERESIS
+0xF7 U+1E6B # LATIN SMALL LETTER T WITH DOT ABOVE
+0xF8 U+00F8 # LATIN SMALL LETTER O WITH STROKE
+0xF9 U+00F9 # LATIN SMALL LETTER U WITH GRAVE
+0xFA U+00FA # LATIN SMALL LETTER U WITH ACUTE
+0xFB U+00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX
+0xFC U+00FC # LATIN SMALL LETTER U WITH DIAERESIS
+0xFD U+00FD # LATIN SMALL LETTER Y WITH ACUTE
+0xFE U+0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX
+0xFF U+00FF # LATIN SMALL LETTER Y WITH DIAERESIS
diff --git a/src/chrtrans/make-msc.bat b/src/chrtrans/make-msc.bat
index 7d7ca0f7..58e00cee 100644
--- a/src/chrtrans/make-msc.bat
+++ b/src/chrtrans/make-msc.bat
@@ -17,6 +17,7 @@ makeuctb cp737_uni.tbl
makeuctb cp775_uni.tbl
makeuctb cp850_uni.tbl
makeuctb cp852_uni.tbl
+makeuctb cp857_uni.tbl
makeuctb cp862_uni.tbl
makeuctb cp864_uni.tbl
makeuctb cp866_uni.tbl
@@ -35,6 +36,8 @@ makeuctb iso07_uni.tbl
makeuctb iso08_uni.tbl
makeuctb iso09_uni.tbl
makeuctb iso10_uni.tbl
+makeuctb iso13_uni.tbl
+makeuctb iso14_uni.tbl
makeuctb iso15_uni.tbl
makeuctb koi8r_uni.tbl
makeuctb koi8u_uni.tbl
diff --git a/src/chrtrans/makefile.dos b/src/chrtrans/makefile.dos
index 975561d9..07c141f4 100644
--- a/src/chrtrans/makefile.dos
+++ b/src/chrtrans/makefile.dos
@@ -38,6 +38,7 @@ TABLES= \
cp775_uni.h \
cp850_uni.h \
cp852_uni.h \
+ cp857_uni.h \
cp862_uni.h \
cp864_uni.h \
cp866_uni.h \
@@ -56,6 +57,8 @@ TABLES= \
iso08_uni.h \
iso09_uni.h \
iso10_uni.h \
+ iso13_uni.h \
+ iso14_uni.h \
iso15_uni.h \
koi8r_uni.h \
koi8u_uni.h \
@@ -91,6 +94,7 @@ cp737_uni.h: cp737_uni.tbl makeuctb.exe
cp775_uni.h: cp775_uni.tbl makeuctb.exe
cp850_uni.h: cp850_uni.tbl makeuctb.exe
cp852_uni.h: cp852_uni.tbl makeuctb.exe
+cp857_uni.h: cp857_uni.tbl makeuctb.exe
cp862_uni.h: cp862_uni.tbl makeuctb.exe
cp864_uni.h: cp864_uni.tbl makeuctb.exe
cp866_uni.h: cp866_uni.tbl makeuctb.exe
@@ -109,6 +113,8 @@ iso07_uni.h: iso07_uni.tbl makeuctb.exe
iso08_uni.h: iso08_uni.tbl makeuctb.exe
iso09_uni.h: iso09_uni.tbl makeuctb.exe
iso10_uni.h: iso10_uni.tbl makeuctb.exe
+iso13_uni.h: iso13_uni.tbl makeuctb.exe
+iso14_uni.h: iso14_uni.tbl makeuctb.exe
iso15_uni.h: iso15_uni.tbl makeuctb.exe
koi8r_uni.h: koi8r_uni.tbl makeuctb.exe
koi8u_uni.h: koi8u_uni.tbl makeuctb.exe
diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in
index 67ed495b..166e69db 100644
--- a/src/chrtrans/makefile.in
+++ b/src/chrtrans/makefile.in
@@ -74,6 +74,7 @@ TABLES= \
cp775_uni.h \
cp850_uni.h \
cp852_uni.h \
+ cp857_uni.h \
cp862_uni.h \
cp864_uni.h \
cp866_uni.h \
@@ -92,6 +93,8 @@ TABLES= \
iso08_uni.h \
iso09_uni.h \
iso10_uni.h \
+ iso13_uni.h \
+ iso14_uni.h \
iso15_uni.h \
koi8r_uni.h \
koi8u_uni.h \
@@ -141,6 +144,7 @@ cp737_uni.h: $(srcdir)/cp737_uni.tbl $(MAKEUCTB)
cp775_uni.h: $(srcdir)/cp775_uni.tbl $(MAKEUCTB)
cp850_uni.h: $(srcdir)/cp850_uni.tbl $(MAKEUCTB)
cp852_uni.h: $(srcdir)/cp852_uni.tbl $(MAKEUCTB)
+cp857_uni.h: $(srcdir)/cp857_uni.tbl $(MAKEUCTB)
cp862_uni.h: $(srcdir)/cp862_uni.tbl $(MAKEUCTB)
cp864_uni.h: $(srcdir)/cp864_uni.tbl $(MAKEUCTB)
cp866_uni.h: $(srcdir)/cp866_uni.tbl $(MAKEUCTB)
@@ -159,6 +163,8 @@ iso07_uni.h: $(srcdir)/iso07_uni.tbl $(MAKEUCTB)
iso08_uni.h: $(srcdir)/iso08_uni.tbl $(MAKEUCTB)
iso09_uni.h: $(srcdir)/iso09_uni.tbl $(MAKEUCTB)
iso10_uni.h: $(srcdir)/iso10_uni.tbl $(MAKEUCTB)
+iso13_uni.h: $(srcdir)/iso13_uni.tbl $(MAKEUCTB)
+iso14_uni.h: $(srcdir)/iso14_uni.tbl $(MAKEUCTB)
iso15_uni.h: $(srcdir)/iso15_uni.tbl $(MAKEUCTB)
koi8r_uni.h: $(srcdir)/koi8r_uni.tbl $(MAKEUCTB)
koi8u_uni.h: $(srcdir)/koi8u_uni.tbl $(MAKEUCTB)
diff --git a/src/chrtrans/makefile.msc b/src/chrtrans/makefile.msc
index 228af43e..63a19dd8 100644
--- a/src/chrtrans/makefile.msc
+++ b/src/chrtrans/makefile.msc
@@ -36,6 +36,7 @@ TABLES= \
cp775_uni.h \
cp850_uni.h \
cp852_uni.h \
+ cp857_uni.h \
cp862_uni.h \
cp864_uni.h \
cp866_uni.h \
@@ -54,6 +55,8 @@ TABLES= \
iso08_uni.h \
iso09_uni.h \
iso10_uni.h \
+ iso13_uni.h \
+ iso14_uni.h \
iso15_uni.h \
koi8r_uni.h \
koi8u_uni.h \
@@ -91,6 +94,7 @@ cp737_uni.h: cp737_uni.tbl makeuctb.exe
cp775_uni.h: cp775_uni.tbl makeuctb.exe
cp850_uni.h: cp850_uni.tbl makeuctb.exe
cp852_uni.h: cp852_uni.tbl makeuctb.exe
+cp857_uni.h: cp857_uni.tbl makeuctb.exe
cp862_uni.h: cp862_uni.tbl makeuctb.exe
cp864_uni.h: cp864_uni.tbl makeuctb.exe
cp866_uni.h: cp866_uni.tbl makeuctb.exe
@@ -109,6 +113,8 @@ iso07_uni.h: iso07_uni.tbl makeuctb.exe
iso08_uni.h: iso08_uni.tbl makeuctb.exe
iso09_uni.h: iso09_uni.tbl makeuctb.exe
iso10_uni.h: iso10_uni.tbl makeuctb.exe
+iso13_uni.h: iso13_uni.tbl makeuctb.exe
+iso14_uni.h: iso14_uni.tbl makeuctb.exe
iso15_uni.h: iso15_uni.tbl makeuctb.exe
koi8r_uni.h: koi8r_uni.tbl makeuctb.exe
koi8u_uni.h: koi8u_uni.tbl makeuctb.exe
diff --git a/src/chrtrans/makew32.bat b/src/chrtrans/makew32.bat
index e03e1743..d80663a1 100644
--- a/src/chrtrans/makew32.bat
+++ b/src/chrtrans/makew32.bat
@@ -22,6 +22,7 @@ makeuctb cp737_uni.tbl
makeuctb cp775_uni.tbl
makeuctb cp850_uni.tbl
makeuctb cp852_uni.tbl
+makeuctb cp857_uni.tbl
makeuctb cp862_uni.tbl
makeuctb cp864_uni.tbl
makeuctb cp866_uni.tbl
@@ -40,6 +41,8 @@ makeuctb iso07_uni.tbl
makeuctb iso08_uni.tbl
makeuctb iso09_uni.tbl
makeuctb iso10_uni.tbl
+makeuctb iso13_uni.tbl
+makeuctb iso14_uni.tbl
makeuctb iso15_uni.tbl
makeuctb koi8r_uni.tbl
makeuctb koi8u_uni.tbl
diff --git a/src/chrtrans/pt154_uni.tbl b/src/chrtrans/pt154_uni.tbl
index a15c22e8..0bacb527 100644
--- a/src/chrtrans/pt154_uni.tbl
+++ b/src/chrtrans/pt154_uni.tbl
@@ -1,4 +1,4 @@
-Mptcp154
+Mptcp154
#
OCyrillic-Asian (PT154)
#
@@ -12,163 +12,163 @@ C1540
# CP154
# Cyrillic-Asian
#
-# Suitability for use in MIME text:
-# Yes
+# Suitability for use in MIME text:
+# Yes
+#
+# ISO 10646 equivalency table:
+# Format: Three tab-separated columns
+# Column #1 is the Paratype CP154 code (in hex)
+# Column #2 is the Unicode (in hex as 0xXXXX)
+# Column #3 is the Unicode name (follows a comment sign, '#')
+#
+# The entries are in Paratype CP154 order
#
-# ISO 10646 equivalency table:
-# Format: Three tab-separated columns
-# Column #1 is the Paratype CP154 code (in hex)
-# Column #2 is the Unicode (in hex as 0xXXXX)
-# Column #3 is the Unicode name (follows a comment sign, '#')
-#
-# The entries are in Paratype CP154 order
-#
#####
0x20-0x7e idem
#
-0x80 U+0496 # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
-0x81 U+0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE
-0x82 U+04EE # CYRILLIC CAPITAL LETTER U WITH MACRON
-0x83 U+0493 # CYRILLIC SMALL LETTER GHE WITH STROKE
-0x84 U+201E # DOUBLE LOW-9 QUOTATION MARK
-0x85 U+2026 # HORIZONTAL ELLIPSIS
-0x86 U+04B6 # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
-0x87 U+04AE # CYRILLIC CAPITAL LETTER STRAIGHT U
-0x88 U+04B2 # CYRILLIC CAPITAL LETTER HA WITH DESCENDER
-0x89 U+04AF # CYRILLIC SMALL LETTER STRAIGHT U
-0x8a U+04A0 # CYRILLIC CAPITAL LETTER BASHKIR KA
-0x8b U+04E2 # CYRILLIC CAPITAL LETTER I WITH MACRON
-0x8c U+04A2 # CYRILLIC CAPITAL LETTER EN WITH DESCENDER
-0x8d U+049A # CYRILLIC CAPITAL LETTER KA WITH DESCENDER
-0x8e U+04BA # CYRILLIC CAPITAL LETTER SHHA
-0x8f U+04B8 # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
-0x90 U+0497 # CYRILLIC SMALL LETTER ZHE WITH DESCENDER
-0x91 U+2018 # LEFT SINGLE QUOTATION MARK
-0x92 U+2019 # RIGHT SINGLE QUOTATION MARK
-0x93 U+201C # LEFT DOUBLE QUOTATION MARK
-0x94 U+201D # RIGHT DOUBLE QUOTATION MARK
-0x95 U+2022 # BULLET
-0x96 U+2013 # EN DASH
-0x97 U+2014 # EM DASH
-0x98 U+04B3 # CYRILLIC SMALL LETTER HA WITH DESCENDER
-0x99 U+04B7 # CYRILLIC SMALL LETTER CHE WITH DESCENDER
-0x9a U+04A1 # CYRILLIC SMALL LETTER BASHKIR KA
-0x9b U+04E3 # CYRILLIC SMALL LETTER I WITH MACRON
-0x9c U+04A3 # CYRILLIC SMALL LETTER EN WITH DESCENDER
-0x9d U+049B # CYRILLIC SMALL LETTER KA WITH DESCENDER
-0x9e U+04BB # CYRILLIC SMALL LETTER SHHA
-0x9f U+04B9 # CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
-0xa0 U+00A0 # NO-BREAK SPACE
-0xa1 U+040E # CYRILLIC CAPITAL LETTER SHORT U (Byelorussian)
-0xa2 U+045E # CYRILLIC SMALL LETTER SHORT U (Byelorussian)
-0xa3 U+0408 # CYRILLIC CAPITAL LETTER JE
-0xa4 U+04E8 # CYRILLIC CAPITAL LETTER BARRED O
-0xa5 U+0498 # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
-0xa6 U+04B0 # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
-0xa7 U+00A7 # SECTION SIGN
-0xa8 U+0401 # CYRILLIC CAPITAL LETTER IO
-0xa9 U+00A9 # COPYRIGHT SIGN
-0xaa U+04D8 # CYRILLIC CAPITAL LETTER SCHWA
-0xab U+00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-0xac U+00AC # NOT SIGN
-0xad U+04EF # CYRILLIC SMALL LETTER U WITH MACRON
-0xae U+00AE # REGISTERED SIGN
-0xaf U+049C # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
-0xb0 U+00B0 # DEGREE SIGN
-0xb1 U+04B1 # CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
-0xb2 U+0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
-0xb3 U+0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
-0xb4 U+0499 # CYRILLIC SMALL LETTER ZE WITH DESCENDER
-0xb5 U+04E9 # CYRILLIC SMALL LETTER BARRED O
-0xb6 U+00B6 # PILCROW SIGN
-0xb7 U+00B7 # MIDDLE DOT
-0xb8 U+0451 # CYRILLIC SMALL LETTER IO
-0xb9 U+2116 # NUMERO SIGN
-0xba U+04D9 # CYRILLIC SMALL LETTER SCHWA
-0xbb U+00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-0xbc U+0458 # CYRILLIC SMALL LETTER JE
-0xbd U+04AA # CYRILLIC CAPITAL LETTER ES WITH DESCENDER
-0xbe U+04AB # CYRILLIC SMALL LETTER ES WITH DESCENDER
-0xbf U+049D # CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
-0xc0 U+0410 # CYRILLIC CAPITAL LETTER A
-0xc1 U+0411 # CYRILLIC CAPITAL LETTER BE
-0xc2 U+0412 # CYRILLIC CAPITAL LETTER VE
-0xc3 U+0413 # CYRILLIC CAPITAL LETTER GHE
-0xc4 U+0414 # CYRILLIC CAPITAL LETTER DE
-0xc5 U+0415 # CYRILLIC CAPITAL LETTER IE
-0xc6 U+0416 # CYRILLIC CAPITAL LETTER ZHE
-0xc7 U+0417 # CYRILLIC CAPITAL LETTER ZE
-0xc8 U+0418 # CYRILLIC CAPITAL LETTER I
-0xc9 U+0419 # CYRILLIC CAPITAL LETTER SHORT I
-0xca U+041A # CYRILLIC CAPITAL LETTER KA
-0xcb U+041B # CYRILLIC CAPITAL LETTER EL
-0xcc U+041C # CYRILLIC CAPITAL LETTER EM
-0xcd U+041D # CYRILLIC CAPITAL LETTER EN
-0xce U+041E # CYRILLIC CAPITAL LETTER O
-0xcf U+041F # CYRILLIC CAPITAL LETTER PE
-0xd0 U+0420 # CYRILLIC CAPITAL LETTER ER
-0xd1 U+0421 # CYRILLIC CAPITAL LETTER ES
-0xd2 U+0422 # CYRILLIC CAPITAL LETTER TE
-0xd3 U+0423 # CYRILLIC CAPITAL LETTER U
-0xd4 U+0424 # CYRILLIC CAPITAL LETTER EF
-0xd5 U+0425 # CYRILLIC CAPITAL LETTER HA
-0xd6 U+0426 # CYRILLIC CAPITAL LETTER TSE
-0xd7 U+0427 # CYRILLIC CAPITAL LETTER CHE
-0xd8 U+0428 # CYRILLIC CAPITAL LETTER SHA
-0xd9 U+0429 # CYRILLIC CAPITAL LETTER SHCHA
-0xda U+042A # CYRILLIC CAPITAL LETTER HARD SIGN
-0xdb U+042B # CYRILLIC CAPITAL LETTER YERU
-0xdc U+042C # CYRILLIC CAPITAL LETTER SOFT SIGN
-0xdd U+042D # CYRILLIC CAPITAL LETTER E
-0xde U+042E # CYRILLIC CAPITAL LETTER YU
-0xdf U+042F # CYRILLIC CAPITAL LETTER YA
-0xe0 U+0430 # CYRILLIC SMALL LETTER A
-0xe1 U+0431 # CYRILLIC SMALL LETTER BE
-0xe2 U+0432 # CYRILLIC SMALL LETTER VE
-0xe3 U+0433 # CYRILLIC SMALL LETTER GHE
-0xe4 U+0434 # CYRILLIC SMALL LETTER DE
-0xe5 U+0435 # CYRILLIC SMALL LETTER IE
-0xe6 U+0436 # CYRILLIC SMALL LETTER ZHE
-0xe7 U+0437 # CYRILLIC SMALL LETTER ZE
-0xe8 U+0438 # CYRILLIC SMALL LETTER I
-0xe9 U+0439 # CYRILLIC SMALL LETTER SHORT I
-0xea U+043A # CYRILLIC SMALL LETTER KA
-0xeb U+043B # CYRILLIC SMALL LETTER EL
-0xec U+043C # CYRILLIC SMALL LETTER EM
-0xed U+043D # CYRILLIC SMALL LETTER EN
-0xee U+043E # CYRILLIC SMALL LETTER O
-0xef U+043F # CYRILLIC SMALL LETTER PE
-0xf0 U+0440 # CYRILLIC SMALL LETTER ER
-0xf1 U+0441 # CYRILLIC SMALL LETTER ES
-0xf2 U+0442 # CYRILLIC SMALL LETTER TE
-0xf3 U+0443 # CYRILLIC SMALL LETTER U
-0xf4 U+0444 # CYRILLIC SMALL LETTER EF
-0xf5 U+0445 # CYRILLIC SMALL LETTER HA
-0xf6 U+0446 # CYRILLIC SMALL LETTER TSE
-0xf7 U+0447 # CYRILLIC SMALL LETTER CHE
-0xf8 U+0448 # CYRILLIC SMALL LETTER SHA
-0xf9 U+0449 # CYRILLIC SMALL LETTER SHCHA
-0xfa U+044A # CYRILLIC SMALL LETTER HARD SIGN
-0xfb U+044B # CYRILLIC SMALL LETTER YERU
-0xfc U+044C # CYRILLIC SMALL LETTER SOFT SIGN
-0xfd U+044D # CYRILLIC SMALL LETTER E
-0xfe U+044E # CYRILLIC SMALL LETTER YU
-0xff U+044F # CYRILLIC SMALL LETTER YA
+0x80 U+0496 # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
+0x81 U+0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE
+0x82 U+04EE # CYRILLIC CAPITAL LETTER U WITH MACRON
+0x83 U+0493 # CYRILLIC SMALL LETTER GHE WITH STROKE
+0x84 U+201E # DOUBLE LOW-9 QUOTATION MARK
+0x85 U+2026 # HORIZONTAL ELLIPSIS
+0x86 U+04B6 # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
+0x87 U+04AE # CYRILLIC CAPITAL LETTER STRAIGHT U
+0x88 U+04B2 # CYRILLIC CAPITAL LETTER HA WITH DESCENDER
+0x89 U+04AF # CYRILLIC SMALL LETTER STRAIGHT U
+0x8a U+04A0 # CYRILLIC CAPITAL LETTER BASHKIR KA
+0x8b U+04E2 # CYRILLIC CAPITAL LETTER I WITH MACRON
+0x8c U+04A2 # CYRILLIC CAPITAL LETTER EN WITH DESCENDER
+0x8d U+049A # CYRILLIC CAPITAL LETTER KA WITH DESCENDER
+0x8e U+04BA # CYRILLIC CAPITAL LETTER SHHA
+0x8f U+04B8 # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
+0x90 U+0497 # CYRILLIC SMALL LETTER ZHE WITH DESCENDER
+0x91 U+2018 # LEFT SINGLE QUOTATION MARK
+0x92 U+2019 # RIGHT SINGLE QUOTATION MARK
+0x93 U+201C # LEFT DOUBLE QUOTATION MARK
+0x94 U+201D # RIGHT DOUBLE QUOTATION MARK
+0x95 U+2022 # BULLET
+0x96 U+2013 # EN DASH
+0x97 U+2014 # EM DASH
+0x98 U+04B3 # CYRILLIC SMALL LETTER HA WITH DESCENDER
+0x99 U+04B7 # CYRILLIC SMALL LETTER CHE WITH DESCENDER
+0x9a U+04A1 # CYRILLIC SMALL LETTER BASHKIR KA
+0x9b U+04E3 # CYRILLIC SMALL LETTER I WITH MACRON
+0x9c U+04A3 # CYRILLIC SMALL LETTER EN WITH DESCENDER
+0x9d U+049B # CYRILLIC SMALL LETTER KA WITH DESCENDER
+0x9e U+04BB # CYRILLIC SMALL LETTER SHHA
+0x9f U+04B9 # CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
+0xa0 U+00A0 # NO-BREAK SPACE
+0xa1 U+040E # CYRILLIC CAPITAL LETTER SHORT U (Byelorussian)
+0xa2 U+045E # CYRILLIC SMALL LETTER SHORT U (Byelorussian)
+0xa3 U+0408 # CYRILLIC CAPITAL LETTER JE
+0xa4 U+04E8 # CYRILLIC CAPITAL LETTER BARRED O
+0xa5 U+0498 # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
+0xa6 U+04B0 # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
+0xa7 U+00A7 # SECTION SIGN
+0xa8 U+0401 # CYRILLIC CAPITAL LETTER IO
+0xa9 U+00A9 # COPYRIGHT SIGN
+0xaa U+04D8 # CYRILLIC CAPITAL LETTER SCHWA
+0xab U+00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xac U+00AC # NOT SIGN
+0xad U+04EF # CYRILLIC SMALL LETTER U WITH MACRON
+0xae U+00AE # REGISTERED SIGN
+0xaf U+049C # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
+0xb0 U+00B0 # DEGREE SIGN
+0xb1 U+04B1 # CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
+0xb2 U+0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
+0xb3 U+0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+0xb4 U+0499 # CYRILLIC SMALL LETTER ZE WITH DESCENDER
+0xb5 U+04E9 # CYRILLIC SMALL LETTER BARRED O
+0xb6 U+00B6 # PILCROW SIGN
+0xb7 U+00B7 # MIDDLE DOT
+0xb8 U+0451 # CYRILLIC SMALL LETTER IO
+0xb9 U+2116 # NUMERO SIGN
+0xba U+04D9 # CYRILLIC SMALL LETTER SCHWA
+0xbb U+00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xbc U+0458 # CYRILLIC SMALL LETTER JE
+0xbd U+04AA # CYRILLIC CAPITAL LETTER ES WITH DESCENDER
+0xbe U+04AB # CYRILLIC SMALL LETTER ES WITH DESCENDER
+0xbf U+049D # CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
+0xc0 U+0410 # CYRILLIC CAPITAL LETTER A
+0xc1 U+0411 # CYRILLIC CAPITAL LETTER BE
+0xc2 U+0412 # CYRILLIC CAPITAL LETTER VE
+0xc3 U+0413 # CYRILLIC CAPITAL LETTER GHE
+0xc4 U+0414 # CYRILLIC CAPITAL LETTER DE
+0xc5 U+0415 # CYRILLIC CAPITAL LETTER IE
+0xc6 U+0416 # CYRILLIC CAPITAL LETTER ZHE
+0xc7 U+0417 # CYRILLIC CAPITAL LETTER ZE
+0xc8 U+0418 # CYRILLIC CAPITAL LETTER I
+0xc9 U+0419 # CYRILLIC CAPITAL LETTER SHORT I
+0xca U+041A # CYRILLIC CAPITAL LETTER KA
+0xcb U+041B # CYRILLIC CAPITAL LETTER EL
+0xcc U+041C # CYRILLIC CAPITAL LETTER EM
+0xcd U+041D # CYRILLIC CAPITAL LETTER EN
+0xce U+041E # CYRILLIC CAPITAL LETTER O
+0xcf U+041F # CYRILLIC CAPITAL LETTER PE
+0xd0 U+0420 # CYRILLIC CAPITAL LETTER ER
+0xd1 U+0421 # CYRILLIC CAPITAL LETTER ES
+0xd2 U+0422 # CYRILLIC CAPITAL LETTER TE
+0xd3 U+0423 # CYRILLIC CAPITAL LETTER U
+0xd4 U+0424 # CYRILLIC CAPITAL LETTER EF
+0xd5 U+0425 # CYRILLIC CAPITAL LETTER HA
+0xd6 U+0426 # CYRILLIC CAPITAL LETTER TSE
+0xd7 U+0427 # CYRILLIC CAPITAL LETTER CHE
+0xd8 U+0428 # CYRILLIC CAPITAL LETTER SHA
+0xd9 U+0429 # CYRILLIC CAPITAL LETTER SHCHA
+0xda U+042A # CYRILLIC CAPITAL LETTER HARD SIGN
+0xdb U+042B # CYRILLIC CAPITAL LETTER YERU
+0xdc U+042C # CYRILLIC CAPITAL LETTER SOFT SIGN
+0xdd U+042D # CYRILLIC CAPITAL LETTER E
+0xde U+042E # CYRILLIC CAPITAL LETTER YU
+0xdf U+042F # CYRILLIC CAPITAL LETTER YA
+0xe0 U+0430 # CYRILLIC SMALL LETTER A
+0xe1 U+0431 # CYRILLIC SMALL LETTER BE
+0xe2 U+0432 # CYRILLIC SMALL LETTER VE
+0xe3 U+0433 # CYRILLIC SMALL LETTER GHE
+0xe4 U+0434 # CYRILLIC SMALL LETTER DE
+0xe5 U+0435 # CYRILLIC SMALL LETTER IE
+0xe6 U+0436 # CYRILLIC SMALL LETTER ZHE
+0xe7 U+0437 # CYRILLIC SMALL LETTER ZE
+0xe8 U+0438 # CYRILLIC SMALL LETTER I
+0xe9 U+0439 # CYRILLIC SMALL LETTER SHORT I
+0xea U+043A # CYRILLIC SMALL LETTER KA
+0xeb U+043B # CYRILLIC SMALL LETTER EL
+0xec U+043C # CYRILLIC SMALL LETTER EM
+0xed U+043D # CYRILLIC SMALL LETTER EN
+0xee U+043E # CYRILLIC SMALL LETTER O
+0xef U+043F # CYRILLIC SMALL LETTER PE
+0xf0 U+0440 # CYRILLIC SMALL LETTER ER
+0xf1 U+0441 # CYRILLIC SMALL LETTER ES
+0xf2 U+0442 # CYRILLIC SMALL LETTER TE
+0xf3 U+0443 # CYRILLIC SMALL LETTER U
+0xf4 U+0444 # CYRILLIC SMALL LETTER EF
+0xf5 U+0445 # CYRILLIC SMALL LETTER HA
+0xf6 U+0446 # CYRILLIC SMALL LETTER TSE
+0xf7 U+0447 # CYRILLIC SMALL LETTER CHE
+0xf8 U+0448 # CYRILLIC SMALL LETTER SHA
+0xf9 U+0449 # CYRILLIC SMALL LETTER SHCHA
+0xfa U+044A # CYRILLIC SMALL LETTER HARD SIGN
+0xfb U+044B # CYRILLIC SMALL LETTER YERU
+0xfc U+044C # CYRILLIC SMALL LETTER SOFT SIGN
+0xfd U+044D # CYRILLIC SMALL LETTER E
+0xfe U+044E # CYRILLIC SMALL LETTER YU
+0xff U+044F # CYRILLIC SMALL LETTER YA
#####
#
-# Additional information:
-# This charset based on CP1251 with added asian cyrillic symbols.
+# Additional information:
+# This charset based on CP1251 with added asian cyrillic symbols.
+#
+# Person & email address to contact for further information:
+# Alexander Uskov
+# InternetDataCenter of KazakhTelecom.
+# e-mail: auskov@idc.kz
#
-# Person & email address to contact for further information:
-# Alexander Uskov
-# InternetDataCenter of KazakhTelecom.
-# e-mail: auskov@idc.kz
+# Intended usage:
+# COMMON
#
-# Intended usage:
-# COMMON
-#
# (record created 2002-09-27)
#
#####