Cyrillic charset re-coder as a Solaris 2 STREAMS module
What is it?
This is a simple Solaris 2 STREAMS kernel module intended to perform on-fly character set translation.
I'm aware of two fundamentally different approaches of representing certain text stored in some base encoding, which is usually native to host system, to other systems where native charset encoding differs from that used at host system. A network news server is an example of a client-server system which sometimes require certain character set convertion.
Application performs charsets translation by itself with regard to client's native character set.
The good thing about this solution is that it works even when text and binary data are mixed in the wire in a protocol/application dependent manner (web server is an example). With this solution implemented, application server still talks directly to the client over network connection hence server has more control over its session to client.
However this design usually requires [sometimes lots of] dedicated code/hacking to application what makes code grow and poorly portable.
Eugene Crosser's Libmcs http://www.average.org/mcs/ is an example implementation of the discussed solution (certain concepts of my STREAMS module were taken from Libmcs).
A dedicated proxy server can accept queries just like application server does and forward data to real application server performing on-fly character set convertion matching client's native character set.
Application independence is the strong side of this approach. The same proxy server can serve a number of application servers.
However, proxying becomes inefficient when application/protocol mixes text and binary data in its connection with client. To support this case proxy should become protocol aware what is generally too complex to implement for the purpose.
Application server misses client connection details behind proxy what may hurt client authentication issues.
Proxying becomes a weakness when end-to-end data encryption used.
A "cyrproxy" server written by Alex Tutubalin ftp://ftp.lexa.ru/pub/domestic/is an example.
This STREAMS module for on-fly charsets translation is a combination of both approaches. It is application independent and re-usable as proxy, it doesn't hide client connection from application server and doesn't affect connection security if data encryption is used.
However, STREAMS module soultion still requires [minor] hacking of application server (application has to push module into its connection stream), is not sane to mixed text/binary data in stream and is poorly portable (STREAMS interface seems to be OS dependent).
The osc Solaris STREAMS module is a free software. Recent version of it's available for free download from http://www.glas.net/~ilya/download/tools/osc/osc.tar.gz
Copyright (C) 2000 by Ilya Etingof.
Redistribution and use of this software in source and compiled forms, with or without modification, are permitted provided that above copyright notice is preserved.
Comments to email@example.com.