From d97a65137382daf2f896a947ba680c095f7ab664 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 18 Jan 1999 12:35:47 -0500 Subject: snapshot of project "lynx", label v2-8-2dev_14 --- src/UCAux.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/UCAux.c') diff --git a/src/UCAux.c b/src/UCAux.c index bbe5321c..3c952a33 100644 --- a/src/UCAux.c +++ b/src/UCAux.c @@ -13,11 +13,16 @@ PUBLIC BOOL UCCanUniTranslateFrom ARGS1( { if (from < 0) return NO; - if (LYCharSet_UC[from].enc == UCT_ENC_7BIT || - LYCharSet_UC[from].enc == UCT_ENC_UTF8) - return YES; - if (LYCharSet_UC[from].codepoints & (UCT_CP_SUBSETOF_LAT1)) - return YES; + if (LYCharSet_UC[from].enc == UCT_ENC_CJK) + return NO; + if (!strcmp(LYCharSet_UC[from].MIMEname, "x-transparent")) + return NO; + if (from == LATIN1) { + if (LYCharSet_UC[from].codepoints & (UCT_CP_SUPERSETOF_LAT1)) + return YES; + } + + /* others YES, but check for lost tables to be sure */ return (LYCharSet_UC[from].UChndl >= 0); } @@ -123,7 +128,7 @@ PUBLIC BOOL UCNeedNotTranslate ARGS2( if (HTCJK == JAPANESE && (!strcmp(fromname, "euc-jp") || !strcmp(fromname, "shift_jis"))) - return YES; /* ??? */ + return YES; /* translate internally by lynx, no unicode */ return NO; /* If not handled by (from == to) above. */ } return NO; @@ -151,7 +156,9 @@ PUBLIC void UCSetTransParams ARGS5( CONST LYUCcharset*, p_out) { CTRACE(tfp, "UCSetTransParams: from %s(%d) to %s(%d)\n", - p_in->MIMEname, p_in->UChndl, p_out->MIMEname, p_out->UChndl); +/* p_in->MIMEname, p_in->UChndl, p_out->MIMEname, p_out->UChndl); */ + p_in->MIMEname, UCGetLYhndl_byMIME(p_in->MIMEname), + p_out->MIMEname, UCGetLYhndl_byMIME(p_out->MIMEname)); /* ** Initialize this element to FALSE, and set it TRUE -- cgit 1.4.1-2-gfad0