mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-09 05:20:36 -04:00
5e83337d49
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. |
||
---|---|---|
.. | ||
see | ||
spidermonkey | ||
ecmascript.c | ||
ecmascript.h | ||
Makefile | ||
see.c | ||
see.h | ||
spidermonkey.c | ||
spidermonkey.h |