1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Fixed the issue when assummed codepage is not UTF-8

This commit is contained in:
Witold Filipczyk 2006-07-19 19:11:03 +02:00 committed by Witold Filipczyk
parent 8c3f931ff0
commit 70a46e12aa
2 changed files with 5 additions and 2 deletions

View File

@ -168,6 +168,7 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(wctype.h)
AC_CHECK_HEADERS(fcntl.h limits.h time.h unistd.h)
AC_CHECK_HEADERS(sigaction.h)
AC_CHECK_HEADERS(arpa/inet.h)

View File

@ -518,7 +518,9 @@ add_document_lines(struct plain_renderer *renderer)
int length = renderer->length;
int was_empty_line = 0;
int was_wrapped = 0;
#ifdef CONFIG_UTF_8
int utf8 = is_cp_utf8(renderer->document->cp);
#endif
for (; length > 0; renderer->lineno++) {
unsigned char *xsource;
int width, added, only_spaces = 1, spaces = 0, was_spaces = 0;
@ -549,7 +551,7 @@ add_document_lines(struct plain_renderer *renderer)
was_spaces = 0;
}
#ifdef CONFIG_UTF_8
if (renderer->document->options.utf8) {
if (utf8) {
unsigned char *text = &source[width];
unicode_val_T data = utf_8_to_unicode(&text,
&source[length]);