From a5d1f788b74b7c45a1f957967c60f2c8293d6e45 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 15 Mar 2014 11:43:07 +0000 Subject: [PATCH] HTMLv: 0.99.73: if document has no encoding UTF will be used git-svn-id: svn://kolibrios.org@4648 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/TWB/TWB.c | 10 +++++----- programs/cmm/browser/HTMLv.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 540487bc99..40ade19f0d 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -305,10 +305,8 @@ void TWebBrowser::Parse(){ TextGoDown(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //чръЁр°штрхь ёыхфє∙є■ ёЄЁюъє } DrawPage(); - - line=NULL; + line=NULL; if (tag) WhatTextStyle(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //юсЁрсюЄър Єхуют - tag = parametr = tagparam = ignor_param = NULL; break; default: @@ -419,9 +417,10 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { DrawBuf.Fill(bg_color); } } while(GetNextParam()); - if (opened) + if (opened) && (cur_encoding==_DEFAULT) { - if (cur_encoding==_DEFAULT) BufEncode(_UTF); //if no encoding specified it would be UTF + debugln("Document has no information about encoding, UTF will be used"); + BufEncode(_UTF); } return; } @@ -637,6 +636,7 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { { strcpy(#options, #options[strrchr(#options, '=')]); //яюшёъ т content= strlwr(#options); + meta_encoding = _DEFAULT; if (!strcmp(#options, "utf-8")) || (!strcmp(#options,"utf8")) meta_encoding = _UTF; if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; diff --git a/programs/cmm/browser/HTMLv.c b/programs/cmm/browser/HTMLv.c index a011276f42..f83949ada8 100644 --- a/programs/cmm/browser/HTMLv.c +++ b/programs/cmm/browser/HTMLv.c @@ -30,14 +30,14 @@ #include "img\URLgoto.txt"; #ifdef LANG_RUS - char version[]=" Текстовый браузер 0.99.72"; + char version[]=" Текстовый браузер 0.99.73"; ?define IMAGES_CACHE_CLEARED "Кэш картинок очищен" ?define T_LAST_SLIDE "Это последний слайд" char loading[] = "Загрузка страницы...
"; unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; char accept_language[]= "Accept-Language: ru\n\0"; #else - char version[]=" Text-based Browser 0.99.72"; + char version[]=" Text-based Browser 0.99.73"; ?define IMAGES_CACHE_CLEARED "Images cache cleared" ?define T_LAST_SLIDE "This slide is the last" char loading[] = "Loading...
";