Cyrsite

Description

Cyrsite package may be useful for people who maintain WWW pages in Russian and who want to provide their pages in multiple encodings. The following encodings are currently supported koi8(koi-8r), iso5(iso-8859-5), win(CP1251), alt (CP866), mac, and transliteration other encodings (not necessarily cyrillic) may be easily added

Current version: 1.12

Copyright Note

Copyright Ilya Sandler 1995,97

The cyrsite package is distributed under the terms of the GNU general public license, which in particular means See full text of the GNU public license for details

Package contents

Installation and use

Important: To use this software you need to be able to run CGI programs on your site -- contact your webmaster about how to do this.

The installation has been simplified enormously since the 1.03 version

  1. create a directory named "cyrsite" somewhere: mkdir cyrsite I recommend to create it in your cgi-bin directory (i.e. in the directory where your CGI programs are located)
  2. download cyrsite.zip into this directory
  3. unzip it: unzip cyrsite.zip
  4. create a working configuration file: cp sample.conf cyrsite.conf (note, the configuration file should stay in cyrsite directory)
  5. change the first lines of cyrsite.pl and cyrcode.pl to point them to location of perl compiler on your system
  6. if cyrsite directory is not a subdirectory of your /cgi-bin, then change the line $utilDir="./cyrsite"; in cyrsite.pl so that it points to cyrsite directory
  7. install the file cyrsite.pl as a CGI program on your system (ask your Webmaster about how to do it), usually you will need to copy cyrsite.pl into your cgi-bin dir and set the appropriate permissions (e.g chmod 755 cyrsite.pl), note everything in cyrsite directory should be readable by cyrsite.pl and cyrcode.pl must be executable by cyrsite.pl when cyrsite.pl is run as a CGI program, which means, that you may need to set appropriate permissions for both cyrsite directory and all the files in it (e.g. chmod 755 cyrsite; chmod 644 *; chmod 755 cyrcode.pl ) again, ask your Webmaster about all the details
  8. edit the config file cyrsite.conf, the default config file has a lot of comments in it, so you shouldn't have any problem with configuring cyrsite

example of use: (assuming that you successfully installed the package in your server's CGI /cgi-bin/ directory).
If you have a page in KOI8 at http://yourhost/path/home.html and you want to provide it in different encodings, you need to put the following link onto your page <a href="/cgi-bin/cyrsite.pl?cyrtable=win&cyrfile=/path/home.html"> switch to win encoding</a> if a user follows this link, he/she will get your page in windows encoding, if he follows any (local) link on this converted page, the new page will be also in windows encoding change "win" to "koi8", "alt","mac","iso5" or "trans" and you will get your page in the appropriate encoding.

See also a sample page

Problems

There are a couple of problems with cyrsite which I'm aware of
  1. cyrsite is written in Perl, which is an interpreted language. However both the code itself and the compiler are pretty fast, so the end user most likely won't notice any slowdown, but if your server is very heavily loaded, the penalty of recompiling the code may add unacceptable extra load to your server. It's up to you to decide if the performance of code/compiler is acceptable for your server...
  2. cyrsite doesn't convert input/output for your own CGI programs.. (e.g. if you want your CGI programs to work with multiple encodings cyrsite won't help you). While this conversion probably can be done, I don't have enough time to work on this feature and haven't seen any requests for it....
  3. There also seems to be an interference between cyrsite, and SSI (Server Side Includes), if you do use SSI, make sure, that SSIs are not disrupted by cyrsite....(Note, this is not a bug in cyrsite, but rather an unfortunate feature of some (all?) SSI implementations)..Similarly, cyrsite may interfere with any other "on-fly" document generation system...
    if you successfully install and use this package on your site, drop me E-mail, OK? Other comments and bug reports are welcome. If you need to install/customize this package for your particular system, feel free to contact me with job offers......
    Ilya Sandler | isandler@www.friends-partners.org
    Last modified: Fri Jul 25 10:24:54 1997