[Top][All Lists]

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

Re: lynx-dev patch: Textarea editing and charset

From: Kim DeVaughn
Subject: Re: lynx-dev patch: Textarea editing and charset
Date: Tue, 12 Oct 1999 06:53:39 -0600

On Sat, Oct 09, 1999, Klaus Weide (address@hidden) said:
| On Sat, 9 Oct 1999, Marek Kubita wrote:
| >
| > about two weeks ago I have reported a bug in 2.8.2's textarea external
| > editing:  lines added in an external editor are always handled as
| > ISO-8859-1 text.  Now I have verified that the bug is still present in
| > 2.8.3dev10 - here is one line patch for it:

Hmmm.  Somehow I must've overlooked your previous message.  Thanks for
submitting it again (along with the fix).  Just as well (actually better),
since I haven't developed a convenient way to test the textarea editing
stuff very extensively with multiple character sets.

| >       f->disabled        = anchor->input_field->disabled;
| > +     f->value_cs        = anchor->input_field->value_cs;
| Actually that should be
|   +     f->value_cs        = current_char_set;
| instead.  Similar logic is used in LYForms.c for line-editing
| of input fields.

The above code is only executed when we need to "clone" new textarea
lines, in which case I think it is clearer what's being done the way
Marek coded it (taking the value from the previously existing textarea

| Normally anchor->input_field->value_cs should already be initialized
| to have the same value as current_char_set, but there can be some
| situations where that's not the case.  (E.g. if you have just changed
| the d.c.s. in the 'O'ptions screen, and the document containing the
| form wasn't reloaded as a result of that - probably because it was
| not the top one.)

If that could happen, it seems that the original textarea lines would
have an incorrect value then.  Perhaps we need to think on this some
more ...?

In any case, there is one other place (in the "insert file" routine)
that needs a similar fix.  The attached fixes both places, using the
original assignment rationale.


Against 2.8.3dev.10:

diff -uNr lynx-2.8.3-dev.10+kd.orig/src/GridText.c 
--- lynx-2.8.3-dev.10+kd.orig/src/GridText.c    Wed Sep 29 05:40:39 1999
+++ lynx-2.8.3-dev.10+kd/src/GridText.c Tue Oct 12 05:32:54 1999
@@ -10662,6 +10662,7 @@
     f->maxlength       = anchor->input_field->maxlength;
     f->no_cache        = anchor->input_field->no_cache;
     f->disabled        = anchor->input_field->disabled;
+    f->value_cs        = anchor->input_field->value_cs;
     /*  Init all the fields in the new HTLine (but see the #if).   */
     l->next           = htline->next;
@@ -11386,6 +11387,7 @@
     f->maxlength       = anchor_ptr->input_field->maxlength;
     f->no_cache        = anchor_ptr->input_field->no_cache;
     f->disabled        = anchor_ptr->input_field->disabled;
+    f->value_cs        = anchor_ptr->input_field->value_cs;
     /*  Init all the fields in the new HTLine (but see the #if).   */
     l->offset         = htline->offset;

reply via email to

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