mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
parent
7b749dccb4
commit
dfbd75c958
@ -657,13 +657,13 @@ unicode_fold_label_case(unicode_val_T c)
|
||||
NONSTATIC_INLINE unicode_val_T
|
||||
utf8_to_unicode(char **string, const char *end)
|
||||
{
|
||||
char *str = *string;
|
||||
unsigned char *str = (unsigned char *)*string;
|
||||
unicode_val_T u;
|
||||
int length;
|
||||
|
||||
length = utf8char_len_tab[(unsigned char)str[0]];
|
||||
length = utf8char_len_tab[str[0]];
|
||||
|
||||
if (str + length > end) {
|
||||
if (str + length > (const unsigned char *)end) {
|
||||
return UCS_NO_CHAR;
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ invalid_utf8:
|
||||
INTERNAL("utf8char_len_tab out of range");
|
||||
goto invalid_utf8;
|
||||
}
|
||||
*string = str + length;
|
||||
*string = (char *)(str + length);
|
||||
return u;
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ drew_char:
|
||||
|
||||
data = utf8_to_unicode(&s, end);
|
||||
cell = unicode_to_cell(data);
|
||||
if (i + 1 < len && cell == 2) {
|
||||
if (i - 1 < len && cell == 2) {
|
||||
draw_char_data(term, x++, y, data);
|
||||
|
||||
data = UCS_NO_CHAR;
|
||||
|
8
test/select.html
Normal file
8
test/select.html
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<select> <option selected="selected">简体中文</option> </select>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user