Вход:  Пароль:  
FreeSource: Lokalizacija/NATSPECDescription ...
Free Source | Каталог | Изменения | НовыеКомментарии | Пользователи | Регистрация |
Это старая версия Lokalizacija/NATSPECDescription за 2005-06-24 14:01:30..


NATSPEC library designed for smoothing national specificities during the using of programs, to put it more exactly:

Pay attention, that given program doesn't support to solve national and interethnic conflicts.

The reasons for the appearance

Linux user, which is really works on this system, collides with charset problems very often: either file contents, or filenames. Practically the occurences are encountered very often, when user is enforced to specify the files (names) encoding, which he deals with. It occurs at 

Moreover, there are huge amount of programs, in which it is necessary to specify the charset, but there is no opportunity to do this:

These problems frequently are not solved, or solved by private capacity, or by not completely correct patch.

It is became clear, that there must be an opportunity to get an answer on following questions in system:

We can hear the opinion often, that these questions doesn't have answers in common case and essentially can't have, and that is why there is no need and it is impossible to try to answer them.
In general, the situation is practically resolved (in case of compatibility completely forgetting about) by total system conversion on UTF-8 charset. Unfortunately even in this case, set of problems will rise (look UTF 8 Conversion Problems article)

But nobody has cancelled compatibility questions and in any case the interaction order as with other operating systems (Windows, DOS, MAC), so with Unix-similar operating systems must be installed and formulated. Especially it is important for the distribution building.

At (may be, fluent) code consideration of such projects as WINE, Linux kernel, gettext, Ly X?, GLIBC, GLIB, mount, submount, cdrtools, zip, dia, beep, xmms requirements were formulated and library realization was created, which let to get answers on charsets questions, and has set of auxiliary functions also, claimed in many projects.

What it is necessary for 

There are variety of programs, which are tightly working with charsets, but by objective circumstance they go their own way in charsets suppport. Enough only to mention mkisofs built-in recoding support, which using the nls, extracted from nobody knows what Linux kernel version.

This project was created for resolving most questions which deals with recoding, beyond concrete program. It promotes portability and let concrete project not to distract on writing crutches for resolving general system problems.

The library is not a silver bullet or heal-all, it is just a feature to promote data portability between different systems and to facilitate users and programmers life during current intermediate phase, when all progressive humanity by one leg has moved to UTF-8 (no, this abbreviation doesn't belong to UFO or coffins).

How it works

LIBNATSPEC library determines such important concepts as 

Other operating systems (WIN,DOS,MAC) charset and codepage for given locale (it works correctly only at supported locales conformity in LIBNATSPEC and GLIBC)
and provides API for their using, and auxiliary functions also, which let:

The principle of composition: All received information if it possible depends on user locale, if it is not defined, the system locale is used.
Suggested in natspec mounting charset autoinstallation exposes autodefined values by default. NOBODY HAS CANCELLED the possibility to set a charset manually. Default value just becomes not iso-8859–1, but that, which must be by locale.

Base for heuristic is a table, obtained by following algorithm: By list of installed with glibc locales, main charset information located in locale, and program also, which obtains information about charsets accordance of different OS from WINE, static array is formed from, which used in library further for charset definition by locale and etc.

The library is written with C language with care of maximally possible portability. At this moment linking needs libc and libpopt libraries. The testing at other systems hasn't took place.
There are interfaces for other languages:

* python

There is a console program, which let to get options, defined in library. For example:

$ natspec -l – to show system locale

$ natspec -i – output all available information
(Please, look at and express your notes about situation definition quality on your machine)

For ALT Linux:
There is a file /etc/sysconfig/i18n in system, in which, besides all, the system locale is set by LANG=locale string. For example, in my system, it is specified at this file: LANG=ru_RU.KOI8-R

Where to download and how to acquaint

The library is available in ALT Linux Sisyphus free packets repository. The library last versions are always available on following resources:

With any questions you may refer to address specified at the project README file. I will be glad to help to prepare this library for your distribution.

How to use

Please contact with e-mail: lav@etersoft.ru

Страницы, ссылающиеся на данную: Локализация/БиблиотекаNATSPEC

Файлов нет. [Показать файлы/форму]
Комментариев нет. [Показать комментарии/форму]