Faq-e
rusconv v.3.11 -- tips and tricks.
Content:
How to tune operating system to find and run rusconv and whatrus from any directory?
What types of files can be converted by rusconv?
For mail reading I use Netscape. What to do if I receive mail in incorrect encoding?
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?
There are funny chars at the end of lines. How to remove them?
Can I use rusconv and whatrus sources in my own programs?
What is the best way to make link on rusconv's web site?
How to tune operating system to find and run rusconv and whatrus from any directory?
In DOS and Windows create any directory where rusconv and whatrus will be placed, C:\UTIL for example. Edit file C:\AUTOEXEC.BAT: add directory C:\UTIL to variable PATH . The simplest way to do it is to add this line at the end of file:
PATH=%PATH%;C:\UTIL
After computer reloaded, rusconv and whatrus can be run from any directory.
In UNIX if you are a system administrator the best way is to copy rusconv and whatrus to directory /usr/local/bin. When this utilities will be accessed by any user. If you have no rights to do this, create directory bin in you home directory and copy programs there. Usually environment variable PATH is set properly and contains this directory. Otherwise edit your startup file (usually ~/.bashrc) and relogin.
What types of files can be converted by rusconv?
Rusconv can convert any files which contain text. They are '.txt', '.html', '.tex', '.rtf', sources of programs and other. Documents (.doc-files), which created by Microsoft Word, are not text files and can be damaged by rusconv.
For mail reading I use Netscape. What to do if I receive mail in incorrect encoding?
First of all change encoding used for mail reading. If it does not help try another method. Create new mail folder (File->New Folder...). Call it, for example, recover and copy mail there. After this file with name like C:\Program files\Netscape\Users\<your name>\mail\recover
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.
Can I use rusconv and whatrus sources in my own programs?
You are not allowed to change sources and create you own versions of rusconv and whatrus. But you can use parts of code in you own projects. Please do not forget to make reference to rusconv and whatrus and to rusconv's web site (http://beta.math.spbu.ru/~prof/w_re/).
What is the best way to make link on rusconv's web site?
It is your choose. Address of rusconv's web site is
http://beta.math.spbu.ru/~prof/w_re/
By default russian version in windows encoding will be loaded. Start pages in other encodings are
http://beta.math.spbu.ru/~prof/w_re/index.html - windows http://beta.math.spbu.ru/~prof/w_re/index-k.html - KOI-8 http://beta.math.spbu.ru/~prof/w_re/index-l.html - latinica http://beta.math.spbu.ru/~prof/w_re/index-e.html - english
Have a nice work!
faq-e.html
Document created by Oleg A. Paraschenko
Last changes - 15 November 1998