August 1, 2014
 
 
RSSRSS feed

Installing Sybase on Your Linux Server - page 4

Why Look at Sybase?

  • July 18, 2002
  • By Alexander Prohorenko

All of the necessary files and advice about Russian language localization can be found at http://www.sybase.newmail.ru/ase/119rus.html. To find your own language localization guides, use any search engine you like and you should be able to find your language packs without much difficulty.

Before we begin this process, make sure you pay attention to upper/lower case in file names. Linux, as with all Unix systems, understands upper and lowers case as different characters, and this can create some problems if you're not careful.

I was also able to find an absolutely prepared Russian localization package for Linux following this link: ftp://ftp.svzserv.kemerovo.su/pub/databases/sybase-ase/Synchsets.tgz. I recommend everybody who needs Russian localization. If you also download http://www.sybase.newmail.ru/files/convtbls.zip you can find a good description of installation inside that package.,

In the meantime, to illustrate how localization works in whatever language you use, I will describe whole process step by step.

First, unpack and copy the appropriate files.

tar -xzf Synchsets.tgz
cp -r charsets/group5/* $SYBASE/charsets
cp -r convtbls/group5/* $SYBASE/charsets
cp -r locales/group5/* $SYBASE/locales

Remember, don't copy the locales.dat file from the archive! It's very old.

Fix files common.loc and server.loc in all subdirectories $SYBASE/locales/russian/--if you have an earlier version, you will need to change the version of these files to that of your server.

Unpack the convtbls.zip archive and copy all tables of conversions utf8->russian:

unzip convtbl.zip
cp CONVTBLS/UNICODE/UTF8/CP866.CTB $SYBASE/charsets/utf8/cp866.ctb
cp CONVTBLS/UNICODE/UTF8/KOI8.CTB $SYBASE/charsets/utf8/koi8.ctb
cp CONVTBLS/UNICODE/UTF8/CP1251.CTB $SYBASE/charsets/utf8/cp1251.ctb

Update the configuration file $SYBASE/charsets/utf8/utf8.cfg by adding these lines:

convertto = koi8, table, MATCH, 3F
convertto = cp1251, table, MATCH, 3F
convertto = cp866, table, MATCH, 3F

And update the file with locales descriptions $SYBASE/locales/locales.dat by adding into the [linux] section these lines:

locale = ru_RU, russian, koi8
locale = ru_UA, russian, koi8

This will allow out Linux clients to operate more smoothly with the new language. Now, into the [natlang] section in the file $SYBASE/config/objectid.dat add:

; russian
1.3.6.1.4.1.897.4.9.2.182119 = russian

Now, don't forget to do little cleanup:


ln -s $SYBASE/locales/message/us_english $SYBASE/locales/messages/russian
ln -s $SYBASE/locales/us_english/cp850 $SYBASE/locales/us_english/cp866
ln -s $SYBASE/locales/us_english/cp850 $SYBASE/locales/us_english/cp1251
ln -s $SYBASE/locales/us_english/cp850 $SYBASE/locales/us_english/koi8 

The next major step to to load a new list of chars and their sort order. The easiest way is to use graphic utility that came with Sybase:


su sybase
$ cd ~
$ bin/sqlloc

In the first window (shown in Figure 4), you have to choose your server.

We do not have password for sa by default. So, just click on OK to open the Default Language dialog box (see Figure 5).

And now let's configure the necessary localization. For example, to support the Windows codepage, with sorting, without dependence of lower/upper case we will choose these options in each respecitive field in the dialog: Russian, cp1251, Russian case-insensitive dictionary ordering.

After clicking on OK, the Add and Remove Languages dialog will appear to will warn us that the codepage will be changed and it will suggest installing a new language (Russian). Again, click on OK. The Localization Summary dialog will appear (see Figure 6).

The utility will start installing support for the Russian language, shown in the Status Output window. Eventually the Status Report window will close and you will be returned to the User Name and Password dialog. Choose Exit.

When configuring the client (OpenClient) for Windows we need to remember to update $SYBASE/ini/objectid.dat. In the section [natlang] add:

; russian
1.3.6.1.4.1.897.4.9.2.182119 = russian 

Also, add identifers of Russian codepages (if you don't have such) in section [charset]:

1.3.6.1.4.1.897.4.9.1.50 = iso88595
1.3.6.1.4.1.897.4.9.1.51 = cp855
1.3.6.1.4.1.897.4.9.1.52 = cp866
1.3.6.1.4.1.897.4.9.1.53 = cp1251
1.3.6.1.4.1.897.4.9.1.55 = koi8
1.3.6.1.4.1.897.4.9.1.56 = mac_cyr

Sitemap | Contact Us