diff --git a/src/bfu/widget.h b/src/bfu/widget.h index 05def3fa..d54695cb 100644 --- a/src/bfu/widget.h +++ b/src/bfu/widget.h @@ -51,6 +51,11 @@ struct widget { struct widget_data { struct widget *widget; + /* For WIDGET_FIELD: If CONFIG_UTF8 is defined and UTF-8 I/O + * is enabled for the terminal, then @cdata is in UTF-8; + * otherwise, @cdata is in the charset of the terminal, and + * the charset is assumed to be unibyte. (Thus, if you choose + * UTF-8 as the charset but disable UTF-8 I/O, you lose.) */ unsigned char *cdata; struct box box; diff --git a/src/document/forms.h b/src/document/forms.h index 764885d8..55934afe 100644 --- a/src/document/forms.h +++ b/src/document/forms.h @@ -94,6 +94,12 @@ struct form_control { int maxlength; int nvalues; unsigned char **values; + /* For FC_SELECT: If CONFIG_UTF8 is defined and UTF-8 I/O is + * enabled for the terminal, then @labels is in UTF-8; + * otherwise, @labels is in the charset of the terminal, and + * the charset is assumed to be unibyte. (Thus, if you choose + * UTF-8 as the charset but disable UTF-8 I/O, you lose.) The + * charset of the document has no effect here. */ unsigned char **labels; struct menu_item *menu; }; diff --git a/src/terminal/draw.h b/src/terminal/draw.h index aa7d4d66..c5fdfbcc 100644 --- a/src/terminal/draw.h +++ b/src/terminal/draw.h @@ -30,7 +30,12 @@ enum screen_char_attr { /* One position in the terminal screen's image. */ struct screen_char { - /* Contains either character value or frame data. */ + /* Contains either character value or frame data. + * If CONFIG_UTF8 is defined, and UTF-8 I/O is enabled for the + * terminal, then the character value is in UCS-4; otherwise, + * it is in the charset of the terminal, and the charset is + * assumed to be unibyte. (Thus, if you choose UTF-8 as the + * charset but disable UTF-8 I/O, you lose.) */ #ifdef CONFIG_UTF8 unicode_val_T data; #else diff --git a/src/viewer/text/form.h b/src/viewer/text/form.h index 7691dc0f..bd1d36e1 100644 --- a/src/viewer/text/form.h +++ b/src/viewer/text/form.h @@ -43,7 +43,12 @@ struct form_state { * is not stored anywhere; extending the string always requires * calling realloc(). The string is not normally allowed to grow * past @form_control.maxlength bytes (not counting the null), - * but there may be ways to get longer strings. */ + * but there may be ways to get longer strings. If CONFIG_UTF8 + * is defined and UTF-8 I/O is enabled for the terminal, then + * @value is in UTF-8; otherwise, @value is in the charset of the + * terminal, and the charset is assumed to be unibyte. (Thus, if + * you choose UTF-8 as the charset but disable UTF-8 I/O, you + * lose.) The charset of the document has no effect here. */ unsigned char *value; /* For FC_TEXT, FC_PASSWORD, and FC_FILE, @state is the byte * position of the insertion point in @value.