lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev current_codepage in WIN_EX&&CJK_EX (was: Lynx .IDE file for Bor


From: Klaus Weide
Subject: lynx-dev current_codepage in WIN_EX&&CJK_EX (was: Lynx .IDE file for Borland C ++)
Date: Wed, 5 Jan 2000 08:56:55 -0600 (CST)

On Wed, 5 Jan 2000, Hiroyuki Senshu wrote:

> >>  The 'current_codepage' is referenced in the following code fragement in
> >> LYCurses.c:
> >> 
> >> #if defined(WIN_EX) && defined(CJK_EX) /* 1999/08/26 (Thu) 17:53:38 */
> >>     {
> >>         extern int current_codepage;    /* PDCurses lib. */
> >> 
> >>         if (current_codepage == 932)
> >>             LYcols = COLS - 1;
> >>     }
> >> #endif
> >
> 
> This code is necessary to indicate the character for which 
> to have width for two characters with one character
> with the English letter safely at the end of the line.

Thank you.  But sorry, I don't really understand that explanation.

But obviously :), the code is trying to determine the current codepage.
Which is just the same thing as what is otherwise called "Display
character set", isn't it?  (Although for D.c.s. we believe the user,
rather than testing some non-portable variable.)

> If it doesn't have this code, 
> the line of the blank is sometimes indicated, 
> and a discrepancy with the unit of a line to manage it inside occurs.

Ok, so it has something to do with character and cell counting, although
I don't understand the details.

> This code judges whether it moves with Japanese environment.
> It is imperfect only to judge only 932 in the meaning.

If the purpose is to determine whether Lynx is operating in a "Japanese
environment" - why are such library-dependent and non-portable things
needed?  This is my main problem/question.  I see more and more tricks
appearing that depend on specific libraries, specific OSs in order to
work, even when there isn't really a logical reason why they should be
restricted like that.

In this case, isn't it enough to look at the current "Display character
set"?  If it is "Japanese (...)", the user says he is operating in a
Japanese environment.  If it isn't, then he doesn't.

If we can trust the user at all to set up the right D.c.s. - and in
general we just have to - then Lynx should just believe the
current_char_set for this purpose as well as for others.

If I missed some important considerations, please let me know.

  Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]