1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-09 05:20:36 -04:00
elinks/src/ecmascript
Kalle Olavi Niemitalo 5e83337d49 Bug 784: Keep form_control.default_value in the document charset.
Previously, html_special_form_control converted
form_control.default_value to the terminal charset, and init_form_state
then copied the value to form_state.value.  However, when CONFIG_UTF8
is defined and UTF-8 I/O is enabled, form_state.value is supposed to
be in UTF-8, rather than in the terminal charset.

This mismatch could not be conveniently fixed in
html_special_form_control because that does not know which terminal is
being used and whether UTF-8 I/O is enabled there.  Also, constructing
a conversion table from the document charset to form_state.value could
have ruined renderer_context.convert_table, because src/intl/charsets.c
does not support multiple concurrent conversion tables.

So instead, we now keep form_control.default_value in the document
charset, and convert it in the viewer each time it is needed.  Because
the result of the conversion is kept in form_state.value between
incremental renderings, this shouldn't even slow things down too much.

I am not implementing the proper charset conversions for the DOM
defaultValue property yet, because the current code doesn't have
them for other string properties either, and bug 805 is already open
for that.
2007-04-29 22:01:13 +03:00
..
see Bug 784: Keep form_control.default_value in the document charset. 2007-04-29 22:01:13 +03:00
spidermonkey Bug 784: Keep form_control.default_value in the document charset. 2007-04-29 22:01:13 +03:00
ecmascript.c Cast the NULL argument of straconcat to unsigned char *. 2007-03-11 12:59:11 +02:00
ecmascript.h ECMAScript: Probably superfluous kill_timer. Removed unused include. 2006-10-24 19:10:10 +02:00
Makefile Added SEE_CFLAGS to the Makefile.config. Use SEE_CFLAGS only when necessary. 2007-02-18 17:09:32 +02:00
see.c Mark all module names for translation and include needed header files. 2007-03-21 11:01:06 +01:00
see.h Delegate ECMAScript submodule initialisation the right way 2006-02-26 08:51:36 +00:00
spidermonkey.c Mark all module names for translation and include needed header files. 2007-03-21 11:01:06 +01:00
spidermonkey.h Delegate ECMAScript submodule initialisation the right way 2006-02-26 08:51:36 +00:00