Rev 4646 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4646 | Rev 4648 | ||
---|---|---|---|
Line 303... | Line 303... | ||
303 | DrawPage(); |
303 | DrawPage(); |
304 | strcpy(#line, #temp); |
304 | strcpy(#line, #temp); |
305 | TextGoDown(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //çàêðàøèâàåì ñëåäóùóþ ñòðîêó |
305 | TextGoDown(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //çàêðàøèâàåì ñëåäóùóþ ñòðîêó |
306 | } |
306 | } |
307 | DrawPage(); |
307 | DrawPage(); |
308 | - | ||
309 | line=NULL; |
308 | line=NULL; |
310 | if (tag) WhatTextStyle(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //îáðàáîòêà òåãîâ |
309 | if (tag) WhatTextStyle(list.x + 5, stroka * 10 + list.y + 5, list.w - 20); //îáðàáîòêà òåãîâ |
311 | - | ||
312 | tag = parametr = tagparam = ignor_param = NULL; |
310 | tag = parametr = tagparam = ignor_param = NULL; |
313 | break; |
311 | break; |
314 | default: |
312 | default: |
315 | DEFAULT_MARK: |
313 | DEFAULT_MARK: |
316 | if (bukva<=15) bukva=' '; |
314 | if (bukva<=15) bukva=' '; |
Line 417... | Line 415... | ||
417 | { |
415 | { |
418 | bg_color=GetColor(#options); |
416 | bg_color=GetColor(#options); |
419 | DrawBuf.Fill(bg_color); |
417 | DrawBuf.Fill(bg_color); |
420 | } |
418 | } |
421 | } while(GetNextParam()); |
419 | } while(GetNextParam()); |
422 | if (opened) |
420 | if (opened) && (cur_encoding==_DEFAULT) |
423 | { |
421 | { |
424 | if (cur_encoding==_DEFAULT) BufEncode(_UTF); //if no encoding specified it would be UTF |
422 | debugln("Document has no information about encoding, UTF will be used"); |
- | 423 | BufEncode(_UTF); |
|
425 | } |
424 | } |
426 | return; |
425 | return; |
427 | } |
426 | } |
Line 428... | Line 427... | ||
428 | 427 | ||
Line 635... | Line 634... | ||
635 | do{ |
634 | do{ |
636 | if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content=")) || (!strcmp(#parametr, "encoding=")) |
635 | if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content=")) || (!strcmp(#parametr, "encoding=")) |
637 | { |
636 | { |
638 | strcpy(#options, #options[strrchr(#options, '=')]); //ïîèñê â content= |
637 | strcpy(#options, #options[strrchr(#options, '=')]); //ïîèñê â content= |
639 | strlwr(#options); |
638 | strlwr(#options); |
- | 639 | meta_encoding = _DEFAULT; |
|
640 | if (!strcmp(#options, "utf-8")) || (!strcmp(#options,"utf8")) meta_encoding = _UTF; |
640 | if (!strcmp(#options, "utf-8")) || (!strcmp(#options,"utf8")) meta_encoding = _UTF; |
641 | if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; |
641 | if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; |
642 | if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; |
642 | if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; |
643 | //if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) meta_encoding = _DOS; |
643 | //if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) meta_encoding = _DOS; |
644 | if (cur_encoding==_DEFAULT) BufEncode(meta_encoding); |
644 | if (cur_encoding==_DEFAULT) BufEncode(meta_encoding); |