Emacs для начинающих



Faq-e - часть 2


will be created. It contains message in a plain text. Now you can detect and convert encoding in this file.

 The best encoding to convert to is one in which mail was sent. Then Netscape will show message properly. To detect the source encoding open file 'recover' and find line like Content-type: text/plain; charset=koi8-r.

I created HTML page in Netscape Composer (or in Frontpage or in any other HTML-editor) in windows encoding. Rusconv converted it to encoding KOI-8. Why browser don't show russian text properly?

 Special tags can specify what charset to use for viewing HTML page. This charset will be used even if you choose another one in menu View->Encoding.

 Most part of HTML editors automatically add tag which defines encoding of page. If you convert page outside editor then page will be in another encoding but tag will specify old charset. In this example browser use windows encoding to show KOI-8 version of the page. So it is not surprising that browser don't show russian text properly.

 One way to solve this problem is to convert HTML file inside the editor (if it is allowed). Another way is convert file by rusconv and then in new version of file find line

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">

 and change field charset properly (for example, to koi8-r). But the best of all is to delete this line.

There are funny chars at the end of lines. How to remove them?

 First variant. You use UNIX. May be text is in DOS/windows format of end of lines. To convert it to UNIX format use flag 'crlf2cr'.

 Second variant. You use DOS or windows. May be you occasionally change type of end of lines from UNIX to DOS format but lines yet were in DOS format. To undo changes run rusconv twice - one time with flag '-crlf2cr' and then with flag '-cr2crlf'.

 Third variant. The matter is not in the type of end of lines. In this case delete unnecessary chars manually.




Содержание  Назад  Вперед